static double nullToNaN(Double x) { ret x == null ? Double.NaN : x; }