title: Typescript: Cannot read property 'toLowerCase' of undefined
body: <p>I am getting this error on line:</p>
  <pre><code>return filter ? value.filter(element =&gt; element.type.toLowerCase().indexOf(filter.toString().toLowerCase()) != -1) : value;
  </code></pre>
  <p>when <code>element.type</code> is an empty string (filtering empty column). How to fix this?</p>