Fix work Max and Min function with NaN when field is DBNull