title: How to use Kotlin's `with` expression for nullable types
body: <p>The code below will not compile because the variable <code>myType</code> can be null. Is there a way of executing a <code>with</code> block for nullable types in Kotlin?</p>
  
  <pre><code>    val myType: MyType? = null
      with(myType) {
          aMethodThatBelongsToMyType()
          anotherMemberMethod()            
      }
  </code></pre>