title: kotlin: If value is null then exit, else use that value as not nullable
body: <p>Essentially this is in the title.  I have a value that could be null.  If it is, I just want to exit with a message.  If it's not null, then there's a whole slew of work I need to do with this value.</p>
  <p>I've found similar, but not quite this exact situation.  And it's the subtle difference that's driving me nuts.  Here is my code in java:</p>
  <pre><code>    if (value == null) {
          print(&quot;error!&quot;);
          return;
      }
  
      print(value);
      doFunStuff(value);
      etc(value);
  </code></pre>
  <p>All those methods using <code>value</code> require it to be non-null.</p>
  <p>But I'm having a difficult time figuring this out in kotlin.  With everything I try, the compiler still insists that <code>value</code> is still nullable and refuses to use it in the functions.</p>
  <p>What is the kotlin way of doing this very common code flow?</p>