code: public static void validate(Object parameter) {
          // Validation of top level payload is done outside
          if (parameter == null) {
              return;
          }
  
          Class parameterType = parameter.getClass();
          TypeToken<?> parameterToken = TypeToken.of(parameterType);
          if (Primitives.isWrapperType(parameterType)) {
              parameterToken = parameterToken.unwrap();
          }
          if (parameterToken.isPrimitive()
                  || parameterType.isEnum()
                  || parameterType == Class.class
                  || parameterToken.isSupertypeOf(LocalDate.class)
                  || parameterToken.isSupertypeOf(DateTime.class)
                  || parameterToken.isSupertypeOf(String.class)
                  || parameterToken.isSupertypeOf(DateTimeRfc1123.class)
                  || parameterToken.isSupertypeOf(Period.class)) {
              return;
          }
  
          Annotation skipParentAnnotation = parameterType.getAnnotation(SkipParentValidation.class);
  
          if (skipParentAnnotation == null) {
              for (Class<?> c : parameterToken.getTypes().classes().rawTypes()) {
                  validateClass(c, parameter);
              }
          } else {
              validateClass(parameterType, parameter);
          }
      }
docs: Validates a user provided required parameter to be not null.
  An {@link IllegalArgumentException} is thrown if a property fails the validation.
  
  @param parameter the parameter to validate
  @throws IllegalArgumentException thrown when the Validator determines the argument is invalid