Fix error when spell-checking an empty text (#1489831)