Checks for undefined when inserting autocomplete into textarea
What does this MR do?
Correctly checks for undefined before inserting anything into the textarea when using autocomplete. This happens because the loading indicator tries to insert @undefined
which we dont want to insert.