title: Typescript .length return undefined
body: <p>This issue makes me crazy ...</p>
  
  <p>I have this code : </p>
  
  <pre><code>if (control.value==null||control.value == "" || control.value == " " || control.value.length != 5) {
       // do something
  }
  </code></pre>
  
  <p>My problem : <code>control.value.length</code> always returns 'undefined'.</p>
  
  <p>I try to use a string variable like this but the result is the same.</p>
  
  <pre><code>var curVal: string = control.value;
  if (curVal==null||curVal== "" || curVal == " " || curVal != 5) {
       // do something
  }
  </code></pre>
  
  <p>Where am I wrong ?</p>
  
  <p><em>Edit:</em> Precision : my control.value is not null or empty, I test with the value 59000</p>
  
  <p>This code :</p>
  
  <pre><code>console.log(control.value + ' - ' + control.value.length);
  </code></pre>
  
  <p>log this : <em>59000 - undefined</em></p>
  
  <p><strong>EDIT 2 :</strong> Thank's you, it's solved. The problem was my control.value was a <strong>number</strong> and not a <strong>string</strong>.</p>