I spent too much time trying to avoid if (commit !...
# getting-started
d
I spent too much time trying to avoid if (commit != null) heh
e
it's a
val
so there's nothing wrong with writing
if (commit != null)
and letting smart casting do its thing, I wouldn't say one is always preferred over the other