Fixed docs, implementation, and added NaN
Fixed a bug with undefined and added test coverage:

NaN, Dates, null, undefined