code: public static String serialize(Object value) {
          if (value instanceof String) {
              return (String) value;
          } else if (value instanceof byte[]) {
              return new String((byte[]) value);
          }
docs: This method converts the supplied object to a string.
  
  @param value The value
  @return The string, or null if an error occurred