code: public static <T> T checkNotNull(@Nullable T value, Object varName) {
      if (value == null) {
        throw new NullPointerException(format("{} cannot be null", varName));
      }
      return value;
    }
docs: Ensures that an object reference passed as a parameter to the calling method is not null.
  
  @param value an object reference
  @param varName the variable name to use in an exception message if the check fails
  @return the non-null reference that was validated
  @throws NullPointerException if {@code value} is null