var x = 12; alert (x.toLowerCase ());
Instead you have to say:
var x = 12; alert (x.toString ().toLowerCase ());
Only in very special circumstances in the code I'm working on is x a number. And when it is, converting it to lowercase, which should be a no-op, fails.
BTW, I would never advocate changing the behavior. Too deep, huge breakage potential.