title: Kotlin : How to use if-else like condition with let block for 'null' checks
body: <p>I am replacing all the null checks with let block in my code as part of a code review process.</p>
  
  <p>1.
  Code example with null check:</p>
  
  <pre><code>if(someValue != null){//run if someValue is not null}
  else {//run if someValue is null}
  </code></pre>
  
  <p>2.
  Code base after using let-run block if for null check,</p>
  
  <pre><code>var someValue : String? = null
  someValue = "SOF"
  
  someValue?.let {safeSomeValue-&gt;
  //This code block will run only if someValue is not null
  }?.run {
  //This code block should run only when if someValue is null, like else condition
  }
  </code></pre>
  
  <p>Now problem with let-run block is that both the code blocks are running even if the someValue is not null. So i am not able to replicate behaviour of if-else condition in code example 1 to run-let condition in code example 2.</p>
  
  <p>Expected behaviour is to execute either let or run code block based upon if value is null or not-null.</p>