Special treatment for NaN and Infinity as per RFC-4627.

[RFC](http://tools.ietf.org/html/rfc4627#page-3) specifically states that `NaN` and `Infinity` values are forbidden.

> Numeric values that cannot be represented as sequences of digits
> (such as Infinity and NaN) are not permitted.