Fixed range check for string tokens