public static <T> List<T> asList(Collection<T> c) {
		if (c instanceof List) {
			return (List<T>) c;
		}
		if (c == null) {
			return new ArrayList<>();
		}
		return new ArrayList<>(c);
	}
A convenient way to check for null and whether the given collection is a {@link List}.
If the value is a list, then it is returned.  If the value is null, an empty list is
returned.  Otherwise, a new list is created from the given collection.

@param c the collection to check
@return a list
Ghidra/Framework/Generic/src/main/java/util/CollectionUtils.java