Converts a list to a set.
Example: 1, 2, 3 -> {1, 2, 3}
1, 2, 3
static Set<T>? toSet<T>(List<T> list) => list.isNotEmpty ? Set.from(list) : null;