title: Dart is null check on List entry throws range error
body: <p>I have initialised an otherwise empty list and want to check if that entry is true or null. Since I can't practically populate every entry first with <code>false</code>, I need to check if it is null or true.</p>
  
  <pre><code>List&lt;bool&gt; check = List&lt;bool&gt;();
  </code></pre>
  
  <p>Whether I use:</p>
  
  <pre><code>(check[index]) ? dothis : dothat;
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>(check[index] != null) ? dothis : dothat;
  </code></pre>
  
  <p>they both throw a range error. Since I can't initialise it like</p>
  
  <pre><code>List&lt;bool&gt; check = [false,false,false,false,false forever and ever];
  </code></pre>
  
  <p>How can I solve this?</p>