Correctly cast operand in GenerateStringCheck().