check correct variable for isNaN