Make sure MXID is always defined when writing profiles
Make sure MXID is always defined when writing profiles
Part of #2762 (closed)
This doesn't directly address #2762 (closed)
but I noticed a situation that could happen if the input to ensureCorrectMxidProfile
wasn't validated.