title: Differentiate between NaN input and empty input with an Input of type="number"
body: <p>I want to use a form input with type="number" and only allow numbers to be entered. </p>
  
  <pre><code>&lt;input type="number" class="form-control fc-input"/&gt;
  </code></pre>
  
  <p>I don't have a submit button, instead the value is checked after the input loses focus. However when you use type="number" and a non-number is entered, both the <code>valueAsNumber</code> and the <code>value</code> attributes of the input will be useless (NaN respectively ""). The problem with this is that I want to differentiate between the user entering an empty string (""), and the user entering a non-number value (e.g. 123abc). When the input is empty I want to execute function a, and if it's just a non-number I want to execute function b (otherwise do c).  </p>
  
  <p>Is there a good way to differentiate between NaN input and empty ("") input like this?</p>