asCollection

shorthand for this as? Collection<E> ?: toList()

Return

itself if the receiver Iterable is already a Collection<E>, otherwise calls toList() to create a new one