maxOrNull

fun CharSequence.maxOrNull(): Char?

Returns the largest character or null if there are no characters.

Since Kotlin

1.4