isNullOrBlank() takes whitespace into account:
fun main() {
val thisIsBlank = " "
println(thisIsBlank.isNullOrEmpty())
println(thisIsBlank.isNullOrBlank())
}
This prints:
false
true
because thisIsBlank is not empty, but it is blank.