ReactJS toLowerCase is not a function
<p>I am doing a comparison by converting my text to lowercase and comparing its index to -1, in order to have some value to the particular field in <code>ReactJS</code>, but I am getting this error in JavaScript console:</p>

<blockquote>
  <p>Uncaught TypeError: props.filterText.toLowerCase is not a function</p>
</blockquote>

<pre><code>var props = this.props;
var rows = this.props.episodes
    .filter(function(episode){
        return episode.title.toLowerCase().indexOf(props.filterText.toLowerCase()) &gt; -1;
    })
    .map(function(episode){
       return &lt;EpisodeRow key={episode.title} episode={episode}/&gt;
    });
</code></pre>