title: Object is possibly 'undefined' - after filter that contains check for undefined
body: <p>I'm doing an operation on an array like this:</p>
  
  <pre><code>.filter(key =&gt; actions &amp;&amp; actions[key])
  .forEach(key =&gt; actions[key](event, dispatch));
  </code></pre>
  
  <p>But I'm getting a TypeScript error on the <code>forEach</code> <code>actions</code>: <code>Object is possibly 'undefined'</code>.</p>
  
  <p>Yet it can't be <code>'undefined'</code> as it is filtered for those entries that <em>do</em> have <code>actions</code>.</p>