Optimize syntax for string/number type comparison