private String convertIdToString(Long id) {
    if (id == null) {
      return null;
    } else {
      NumberFormat format = NumberFormat.getIntegerInstance();
      format.setGroupingUsed(false);
      return format.format(id);
    }
  }
Safely converts an id value to a string

@param id the value to convert
@return a string representation of the id
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserResourceProvider.java