public String formatValue(Object value){
  if (value == null) {
    return EMPTY;
  }
  if (value instanceof Number) {
    try {
      return FORMAT_VALUE.format(value);
    }
 catch (    IllegalArgumentException ex) {
      return NAN;
    }
  }
 else {
    return String.valueOf(value);
  }
}

public String formatValue ( Object value ) { if ( value == null ) { return EMPTY ; } if ( value instanceof Number ) { try { return FORMAT_VALUE . format ( value ) ; } catch ( IllegalArgumentException ex ) { return NAN ; } } else { return String . valueOf ( value ) ; } }
formats value . returns empty string if value is null . returns nan if value is not a number . return a formatted string if value is an instance of number , if not returns the value as a string .
