docs: ValidationResult cleanObjectValue(Object o, ValidationContext validationContext)
              throws IllegalArgumentException {
          ValidationResult vr = new ValidationResult();
          // If it's any type of number, send it back
          if (o instanceof Integer
                  || o instanceof Float
                  || o instanceof Boolean
                  || o instanceof Double
                  || o instanceof Long) {
              vr.setObject(o);
              return vr;
          } else if (o instanceof String || o instanceof Character) {
              String value;
              if (o instanceof Character)
                  value = String.valueOf(o);
              else
                  value = (String) o;
              value = value.trim();
  
              for (String x : objectValueCharsNotAllowed) {
                  value = value.replace(x, "");
              }
  
              try {
                  if (value.length() > Constants.MAX_VALUE_LENGTH) {
                      value = value.substring(0, Constants.MAX_VALUE_LENGTH-1);
                      vr.setErrorDesc(value.trim() + "... exceeds the limit of "+ Constants.MAX_VALUE_LENGTH+" chars. Trimmed");
                      vr.setErrorCode(521);
                  }
              } catch (Exception ignore) {
                  // We really shouldn't get here
                  // Ignore
              }
              vr.setObject(value.trim());
              return vr;
          } else if (o instanceof Date) {
              String date = "$D_" + ((Date) o).getTime() / 1000;
              vr.setObject(date);
              return vr;
          } else if ((o instanceof String[] || o instanceof ArrayList) && validationContext.equals(ValidationContext.Profile)) {
              ArrayList<String> valuesList = null;
              if(o instanceof ArrayList)
                  //noinspection unchecked
                  valuesList = (ArrayList<String>) o;
              String[] values = null;
              if(o instanceof String[])
                  values = (String[])o;
  
              ArrayList<String> allStrings = new ArrayList<>();
              if(values!=null) {
                  for (String value : values) {
                      try {
                          allStrings.add(value);
                      } catch (Exception e) {
                          //no-op
                      }
                  }
              }else{
                  for (String value : valuesList) {
                      try {
                          allStrings.add(value);
                      } catch (Exception e) {
                          //no-op
                      }
                  }
              }
              values = allStrings.toArray(new String[allStrings.size()]);
              if(values.length>0 && values.length <= Constants.MAX_MULTI_VALUE_ARRAY_LENGTH){
                  JSONArray jsonArray = new JSONArray();
                  JSONObject jsonObject = new JSONObject();
                  for(String value: values){
                      jsonArray.put(value);
                  }
                  try {
                      jsonObject.put(Constants.COMMAND_SET, jsonArray);
                  }catch (JSONException e){
                      //no-op
                  }
                  vr.setObject(jsonObject);
              }else{
                  vr.setErrorDesc("Invalid user profile property array count - "+ values.length +" max is - "+ Constants.MAX_MULTI_VALUE_ARRAY_LENGTH);
                  vr.setErrorCode(521);
              }
              return vr;
          } else {
              throw new IllegalArgumentException("Not a String, Boolean, Long, Integer, Float, Double, or Date");
          }
      }