Along with Sindre’s comment, if you need a length ...
# getting-started
b
Along with Sindre’s comment, if you need a length you can always use the elvis operator in addition to the ?. (e.g.
val len = lastName?.length ?: -1
)
👍 1