fix string[Infinity] and string.localeCompare.length

fix string[Infinity] and string.localeCompare.length