code: public static <T> T checkNotNull(T reference, String message) {
          if (reference == null) {
              throw new NullPointerException(message);
          }
          return reference;
      }
docs: Checks that the given object reference is not {@code null} and throws a customized
  {@link NullPointerException} if it is. Intended for doing parameter validation in methods and
  constructors, e.g.:
  <blockquote><pre>
  public void foo(Bar bar, Baz baz) {
  this.bar = Preconditions.checkNotNull(bar, "bar must not be null.");
  Preconditions.checkNotBull(baz, "baz must not be null.");
  }
  </pre></blockquote>
  
  @param reference the object reference to check for being {@code null}
  @param message the detail message to be used in the event that an exception is thrown
  @param <T> the type of the reference
  @return {@code reference} if not {@code null}
  @throws NullPointerException if {@code reference} is {@code null}