public static <T1, T2, T3 extends Comparable<T3>> Comparator<T1> getNullSafeComparator(
            final Function<T1, T2> extractor1,
            final Function<T2, T3> extractor2,
            final Comparator<T3> comparator) {

        // Sort with nulls first but also handle null intermediate values
        return Comparator.comparing(
                extractor1,
                Comparator.nullsFirst(
                        Comparator.comparing(
                                extractor2,
                                Comparator.nullsFirst(comparator))));
    }
Creates a null safe case-insensitive comparator that can work with stuff like
getDocRef().getName()
stroom-util-shared/src/main/java/stroom/util/shared/CompareUtil.java