title: Best way to handle null task inside async method?
body: <p>What is the best way to handle a <code>null</code> task inside an <code>async</code> method?</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class MyClass
  {
     private readonly Task task;
     public MyClass(Task task) { this.task = task; }
  
     public async Task Execute()
     {
        if (task == null)
        {
           await Task.Yield(); /* Is this the best way? */
           return;
        }
        await task;
     }
  }
  </code></pre>