title: Kotlin nullability check if-else functional approach...How?
body: <p>For simple check like</p>
  
  <pre><code>if (variable != null) {
     doSomething(variable)
  }
  </code></pre>
  
  <p>We could change to </p>
  
  <pre><code>variable?.let { doSometing(it) }
  </code></pre>
  
  <p>However for a case with else</p>
  
  <pre><code>if (variable != null) {
     doSomething(variable)
  } else {
     doOtherThing()
  }
  </code></pre>
  
  <p>Is there a way of doing so in a single function? Is there something like either?</p>