kotlin.collections.orEmpty
orEmpty
inline fun <T> Set<T>?.orEmpty(): Set<T>
Returns this Set if it's not null
and the empty set otherwise.
inline fun <reified T> Array<out T>?.orEmpty(): Array<out T>
Returns the array if it's not null
, or an empty array otherwise.