public static <T> T checkNotNull(final T reference, final Object errorMessage) {
        if (reference == null) {
            throw new NullPointerException(String.valueOf(errorMessage));
        }
        return reference;
    }
Ensures that an object reference passed as a parameter to the calling
method is not null.

@param reference    an object reference
@param errorMessage the exception message to use if the check fails; will
                    be converted to a string using {@link String#valueOf(Object)}
@return the non-null reference that was validated
@throws NullPointerException if {@code reference} is null
android/android_framework/base/src/main/java/util/PreconditionUtils.java