public static String formatCsv(Number nr){
  if (nr == null) {
    return "";
  }
  return nr.toString();
}

public static String formatCsv ( Number nr ) { if ( nr == null ) { return "" ; } return nr . toString ( ) ; }
formats a given number for csv output ( effectively handles null values ) .
