code: @NotNull public static <T> T checkNotNull(T reference) {
      if (reference == null) {
        throw new NullPointerException();
      }
      return reference;
    }
docs: Checks if the object is null. Returns the object if it is not null, else throws a NullPointerException.
  
  @param reference the object whose nullability has to be checked
  @param <T>       the value type
  @return The object itself
  @throws NullPointerException if the object is null