OK allora la funzione che ti serve e' http://www.w3schools.com/jsref/jsref_isnan.asp