title: Typescript: Argument of type 'string | undefined' is not assignable to parameter of type 'string'
body: <p>I have list of nestet array list, I am trying fiter based on the array value. When I filter getting error. I am using typescript with eslint.</p>
  <pre><code>Argument of type 'string | undefined' is not assignable to parameter of type 'string'
  </code></pre>
  <p>But I checked the null/undefined value but still I am getting error.</p>
  <pre><code>interface User {
    id: string;
    username?: string;
  }
  
  function getList (user:User){
    if(user.username === undefined){
      return {};
    }
    let arrayData: string[][] = [];
    arrayData = [[&quot;abcd&quot;],[&quot;efgh&quot;],[&quot;xyz&quot;],[&quot;abcd&quot;,&quot;xyz&quot;]];
   //here i have differnt logic
    const filterData = arrayData.filter(list =&gt; list.includes(user.username));
    return filterData;
  }
  
  getList({id: &quot;123&quot;, username: &quot;xyz&quot;});
  </code></pre>
  <p>When I use the <code>non-null assertion operator</code> it the error resolved but getting lint issue.</p>
  <pre><code>const filterData = arrayData.filter(list =&gt; list.includes(user.username!));
  </code></pre>
  <p>Can anyone please help me to fix this issue.</p>