added NaN test for initialize variable