Fix Lua operator overloading

Check for NaN rather than null since that's what parseFloat returns
when it fails (see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/parseFloat#Description)