Kotlin FilteriSinstance

fun main() {
    val numbers = listOf(null, 1, "two", 3.0, "four")
    numbers.filterIsInstance<String>().forEach {
        println(it.uppercase())
    }
}
Smoggy Snail