title: Add a List to another List that is either null or not null
body: <p>Consider the the piece of code below. I need to call the method <code>CreateOrAddToLists()</code> in a loop. First time the method is called the two lists <code>casedata.Cases</code> and <code>casedata.Documents</code> will be null, hence I can populate by assigning <code>cases</code> to <code>casedata.Cases</code> like this:</p>
  
  <p><code>casedata.Cases = cases;</code></p>
  
  <p>At any subsequent call to CreateOrAddToLists() lists <code>casedata.Cases</code> and <code>casedata.Documents</code> will not be null and I can add new data to the lists using AddRange():</p>
  
  <p><code>casedata.Cases.AddRange(cases);</code></p>
  
  <pre><code>var casedata = new CaseData(); //contains lists to get populated
  
  private void CreateOrAddToLists()
  {   
      var cases = new List&lt;Case&gt;(); //gets data with from database
      var documents = new List&lt;Document&gt;(); //gets data with from database
  
      if (casedata.Cases == null)
      {
          casedata.Cases = cases;
      }
      else
      {
          casedata.Cases.AddRange(cases);
      }
      if (casedata.Documents == null)
      {
          casedata.Documents = documents;
      }
      else
      {
          casedata.Documents.AddRange(documents);
      }
  }
  </code></pre>
  
  <p>Is there a better or neater way to do a null-check before <code>AddRange</code>? Can I do it in on line of code?</p>