Detect non-finite floats and output them as "null" as per the ECMA-262 spec.