public static <T1, T2> boolean equals(final T1 val1,
                                          final Function<T1, T2> getter,
                                          final Object other) {
        if (val1 == null) {
            return false;
        } else {
            final T2 val2 = getter.apply(val1);
            return Objects.equals(val2, other);
        }
    }
Allows you to safely compare a child property of val1 to other.

@return False if val1 is null else whether the child property of val1 is equal to other
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java