Say I have this variable: ``` val foo: String? ```...
# announcements
m
Say I have this variable:
Copy code
val foo: String?
Is the only way to run some code if foo is not null this:
Copy code
if (foo != null) {
  bar(foo)
}
where:
Copy code
fun bar(x: String)