fixed typo for isNaN