firstIsInstanceOrNull

inline fun <T : Any> Iterable<*>.firstIsInstanceOrNull(): T?
inline fun <T : Any> Sequence<*>.firstIsInstanceOrNull(): T?

This utility method was previously imported from org.jetbrains.kotlin.utils.addToStdlib, and there were a lot of usages. Since no replacement exists in stdlib, it was implemented locally for convenience.