Prevent from js error when messages list does not exist
Fix error when spell-checking an empty text (#1489831)