public static <M extends Map<K, V>, K, V> Collection<K> keySetOf(final Map<K, V> map) {
        return map != null
                ? map.keySet()
                : Collections.emptySet();
    }
Returns the passed map if it is non-null else returns an empty map.
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java