One of the many things I like about Kotlin is the
good selection of primitives for functional programming. For example, the
filterNotNull() method returns only those elements of a list, which are not
equal to null.
Kotlin filterNotNull() in Typescript