public static <L extends List<T>, T> List<T> mutableList(final L list) {
        return list != null
                ? new ArrayList<>(list)
                : new ArrayList<>();
    }
Returns a new {@link ArrayList} instance. If list is not null, the new {@link ArrayList} will
contain the contents of list, else it will be empty.
stroom-util-shared/src/main/java/stroom/util/shared/NullSafe.java