TypeError: Cannot read property 'length' of null
<p>I should write a function that removes vowels from a string. I get an error message about null value. After several tries for fixing it, the message is this same, but I tried to filter null values.</p>

<blockquote>
  <p>TypeError: Cannot read property 'length' of null at getCount at
  Test.it at Test.describe at Object.exports.runInThisContext</p>
</blockquote>

<pre><code>function getCount(str) {
  var vowelsCount = 0;

  if (str &amp;&amp; str.length){
    vowelsCount=str.match(/[aeiou]/gi).length;
  } else {
    vowelsCount=0;
  }

  return vowelsCount;
}

describe("Case 1", function(){
    it ("should be defined", function(){
        Test.assertEquals(getCount("abracadabra"), 5)
    });
});
</code></pre>