firstOrNull

Returns the first element, or null if the progression is empty.

Since Kotlin

1.7