class Preconditions {

    public static <T> T checkNotNull(T object, String errorMessage) {
        if (object == null) {
            throw new NullPointerException(errorMessage);
        }
        return object;
    }

}