Check for `!editor` before calling `editor._codeMirror`.