title: Filter on Multiple columns with singular filter pipe Angular 2/4
body: <p>I am looking to filter multiple columns from one pipe and I cant seem to get it right. I have managed to get it to work with searching a single column but not multiple columns. I have tried implementing <a href="https://stackoverflow.com/questions/41672578/filter-on-multiple-columns-using-one-pipe-angular-2/41738576">this stackoverflow answer</a> but I get an error of</p>
  
  <blockquote>
    <p>ERROR TypeError: Cannot convert undefined or null to object.</p>
  </blockquote>
  
  <p>Here is my code for a single column:</p>
  
  <pre><code>@Pipe({
      name: 'filter'
  })
  
  @Injectable()
  export class FilterPipe implements PipeTransform {
      transform(items: any[], field: string, value: string): any[] {
          if (!items) {
              return [];
          }
          if (!field || !value) {
              return items;
          }
          return items.filter(singleItem =&gt; singleItem[field].toLowerCase().includes(value.toLowerCase()));
  }
  }
  
  Html
   &lt;tr *ngFor="let user of users | orderby: {property: column, direction: direction} | filter : 'FirstName' : searchString; let i = index"&gt; 
      &lt;td&gt;{{user.Salutation.Description}}&lt;/td&gt;
      &lt;td&gt;{{user.FirstName}}&lt;/td&gt;
      &lt;td&gt;{{user.Surname}}&lt;/td&gt;
      &lt;td&gt;{{user.Region.Description === "None" ? "-" : 
          user.Region.Description&lt;/td&gt;
  &lt;td&gt;{{user.Institution === null ? "-" : user.Institution}}&lt;/td&gt;
  &lt;td&gt;{{user.PrimaryResearchField.Description === "None" ? "-" : user.PrimaryResearchField.Description}}&lt;/td&gt;
  &lt;td&gt;{{user.OrcidID === null ? "-" : user.OrcidID}}&lt;/td&gt;
  &lt;/tr&gt;                     
  </code></pre>
  
  <p>Any help would be gratefully received.</p>
  
  <p>Thanks</p>