code: public String format(Object value) {
      ValueFormatter<Object> valueFormatter = VALUE_FORMATTERS.get(value.getClass());
      if (valueFormatter != null) {
        return valueFormatter.format(this, value);
      } else {
        return value.toString();
      }
    }
docs: Try to format specified value with the formatter in a registry.
  This method throws {@link NullPointerException} when the specified value is null.
  @param value the object being formatted
  @return formatted value or value.toString when there is no formatter