bettter test for NaN, added a test for null and a comment