static <T> T checkNotNull(T reference, String errorMessage) {
        if (reference == null) {
            throw new NullPointerException(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.
@return the non-null reference that was validated
@throws NullPointerException if {@code reference} is null
common/src/main/java/org/conscrypt/Preconditions.java