code: @Nullable
    public static <T> T assertIsValid(@Nullable T obj, @Nonnull Validator<T> validator) {
      if (assertNotNull(validator).isValid(obj)) {
        return obj;
      } else {
        final InvalidObjectError error = new InvalidObjectError("Detected invalid object", obj);
        MetaErrorListeners.fireError("Invalid object", error);
        throw error;
      }
    }
docs: Check an object by a validator.
  
  @param <T>       object type
  @param obj       object to be checked
  @param validator validator for the operation
  @return the object if it is valid
  @throws InvalidObjectError will be thrown if the object is invalid
  @since 1.0.2