Angular ng-model becomes an empty string after giving the input field a value and removing it again
<p>input field:</p>

<pre><code>&lt;input  type="text" data-ng-model="some_model" /&gt;
</code></pre>

<p>The initial state of some_model is null. When I add some arbitrary value to the input field and remove it again, some_model becomes an empty string. </p>

<p>What I can do to solve this is something like:</p>

<pre><code>if($scope.some_model != null &amp;&amp; $scope.some_model != undefined &amp;&amp; $scope.some_model.trim() == 0){
      $scope.some_model=null;
  }
</code></pre>

<p>This works, but I'm wondering if there is a standard angular way of doing this? </p>