mapNotNull

inline fun <T, R : Any> Flow<T>.mapNotNull(
    crossinline transform: suspend (value: T) -> R?
): Flow<R>
(source)

Returns a flow that contains only non-null results of applying the given transform function to each value of the original flow.