public static <T1, T2 extends Collection<E>, E> boolean isEmptyCollection(final T1 value,
                                                                              final Function<T1, T2> collectionGetter) {
        if (value == null) {
            return true;
        } else {
            final T2 collection = Objects.requireNonNull(collectionGetter)
                    .apply(value);
            return collection == null || collection.isEmpty();
        }
    }
@return True if value is null or the collection is null or empty
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java