replaced NaN with null