typo...fixed check for NaN to be more clear (I think that's what was being done)