SpellChecker: bound check for string end

Check whether spell check result is out of end of string
Use strict one to avoid IndexOutOfBoundsException.

Change-Id: I6acac77e1e9750258ed364817a8615a6f56bebe4