Added IsNan function.
Added crossplatform issue