public static <K, V> int size(final Map<K, V> map) {
        return map != null
                ? map.size()
                : 0;
    }
@return The size of the collection or zero if null.
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java