added Double.NaN instead of null