title: Cannot read property 'filter' of null in angular 2?
body: <p>I am getting this error  <strong>Cannot read property 'filter' of null</strong></p>
  
  <p>when I apply filter in angular 2 .here is my code</p>
  
  <p><a href="http://plnkr.co/edit/K46jJsnmHiONuqIsnuzW?p=preview" rel="noreferrer">http://plnkr.co/edit/K46jJsnmHiONuqIsnuzW?p=preview</a></p>
  
  <pre><code>import {Pipe} from 'angular2/core';
  
  @Pipe({
    name: 'sortByName',
    pure: false,
  })
  export class SortByNamePipe {
  
    transform (value, [queryString]) {
      // console.log(value, queryString);
      return value.filter((student)=&gt;new RegExp(queryString).test(student.name))
      // return value;
    }
  }
  </code></pre>