code: private Map<String, Object> ensureValidValueTypes(Map<String, Object> parameterValues) {
      Map<String, Object> transformedParameterValues = new HashMap<>();
      for (Map.Entry<String, Object> entry : parameterValues.entrySet()) {
        if (entry.getKey() == null || entry.getValue() == null) {
          continue;
        }
        else {
          Parameter<?> parameter = allParametersMap.get(entry.getKey());
          if (parameter == null) {
            continue;
          }
          else {
            Object transformedValue = PersistenceTypeConversion.fromPersistenceType(entry.getValue(), parameter.getType());
            if (!parameter.getType().isAssignableFrom(transformedValue.getClass())) {
              continue;
            }
            transformedParameterValues.put(entry.getKey(), transformedValue);
          }
        }
      }
      return transformedParameterValues;
    }
docs: Make sure value types match with declared parameter types. Values which types do not match, or for which no
  parameter definition exists are removed. Types are converted from persistence format if required.
  @return Cleaned up parameter values