private Object sanitizeGauge(Object value){
  final Object finalValue;
  if (value instanceof Double && (Double.isInfinite((Double)value) || Double.isNaN((Double)value))) {
    finalValue=null;
  }
 else   if (value instanceof Float && (Float.isInfinite((Float)value) || Float.isNaN((Float)value))) {
    finalValue=null;
  }
 else {
    finalValue=value;
  }
  return finalValue;
}

private Object sanitizeGauge ( Object value ) { final Object finalValue ; if ( value instanceof Double && ( Double . isInfinite ( ( Double ) value ) || Double . isNaN ( ( Double ) value ) ) ) { finalValue = null ; } else if ( value instanceof Float && ( Float . isInfinite ( ( Float ) value ) || Float . isNaN ( ( Float ) value ) ) ) { finalValue = null ; } else { finalValue = value ; } return finalValue ; }
influxdb does not like " nan " for number fields , use null instead
