title: When is $render() of ngModel called with real data?
body: <p>I am writing a directive to cooperate with ngModel.  As shown in the example, I set the $render function on the controller to my function.</p>
  
  <p>When the code initializes, it is invoked twice, the first time with $modelValue and $viewValue set to NaN, and then a second time with the actual value of the model.</p>
  
  <p>The problem is, NaN is a bear to test for.  The function <code>isNaN()</code> is worthless, so far as I can see (it returns false for <code>[""]</code> but true for <code>["."]</code>) and <code>Number.isNaN()</code> is not widely supported.</p>
  
  <p>Any suggestions?</p>