use standard js isNaN function.

Number.isNaN does not exist in safari. 

The replacement isNaN is supported in all browsers: http://www.w3schools.com/jsref/jsref_isnan.asp