ifNonEmpty

fun String?.ifNonEmpty(block: (String) -> Unit)

Invokes the input block iff the string is non-null and non-empty.