indexOfFirstOrNull

fun <T> Iterable<T>.indexOfFirstOrNull(predicate: (T) -> Boolean): Int?

Returns index of the first element matching the given predicate, or null if the iterable does not contain such element.