title: Idiomatic way to return if not null in Kotlin
body: <p>I am looking for an idiomatic way to return if not null a variable in Kotlin. For example, I would like something such as:</p>
  
  <pre><code>for (item in list) {
    getNullableValue(item).? let {
      return it
    }
  }
  </code></pre>
  
  <p>But it's not possible to return inside a <code>let</code> block in Kotlin.</p>
  
  <p>Is there a good way to do this without having to do this:</p>
  
  <pre><code>for (item in list) {
    val nullableValue = getNullableValue(item)
    if (nullableValue != null) {
      return nullableValue
    }
  }
  </code></pre>