added NaN, passes all tests except 1 (codewars)