title: TypeError: Cannot read property 'emailTaken' of null
body: <p>When I enter my email in my RegisterForm and it's equal to the one that sets ['emailTaken'] to true. I get the following error code: </p>
  
  <pre><code>ERROR TypeError: Cannot read property 'emailTaken' of null
  </code></pre>
  
  <p>Here is the code of my function:</p>
  
  <pre><code>checkEmail(control:FormControl): Promise&lt;any&gt; | Observable&lt;any&gt;{
      const answer = new Promise&lt;any&gt;((resolve, reject) =&gt; {
        setTimeout(() =&gt; {
          if(control.value == 'stijn.wauters@outlook.com'){
            resolve({'emailTaken': true})
          }else{
            resolve(null)
          }
        },1500);
      });
      return answer;
    }
  </code></pre>
  
  <p>And here I trigger the ERROR in HTML:</p>
  
  <pre><code>&lt;span *ngIf="registerForm.get('email').errors['emailTaken']" class="help-block"&gt;
                              Email is already taken!
                          &lt;/span&gt;
  </code></pre>
  
  <p>How can I fix this so it doesn't give me errors?</p>