code: public static <T> T returnValueOrThrowIfNull(T value, RuntimeException exception) {
  
      Assert.notNull(exception, "RuntimeException must not be null");
  
      return Optional.ofNullable(value).orElseThrow(() -> exception);
    }
docs: Returns the given {@code value} if not {@literal null} or throws the given {@link RuntimeException}.
  
  @param <T> {@link Class} type of the {@code value}.
  @param value {@link Object} value to evaluate.
  @param exception {@link RuntimeException} to throw if {@code value} is {@literal null}.
  @return the given {@code value} if not {@literal null} or throws the given {@link RuntimeException}.
  @throws IllegalArgumentException if {@code exception} is {@literal null}.
  @throws RuntimeException if {@code value} is {@literal null}.