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