title: String empty to null custom binding
body: <p>Based on this answer <a href="https://stackoverflow.com/questions/7395946/knockout-js-json-has-numeric-but-knockout-changes-it-to-string-any-suggestions">Knockout.js: time input format and value restriction</a>, i'm trying to create a custom binding that sets observable to null if the value is string empty, here is the code that's not working, Ip observable is always null on model</p>
  
  <pre><code>ko.bindingHandlers.stringEmptyNull = {
          init: function (element, valueAccessor, allBindingsAccessor) {
              var underlyingObservable = valueAccessor();
              var interceptor = ko.dependentObservable({
                  read: underlyingObservable,
                  write: function (value) {
                      if (value != null &amp;&amp; value.trim() == '')
                          underlyingObservable();
                  }
              });
              ko.bindingHandlers.value.init(element, function () { return interceptor }, allBindingsAccessor);
          },
          update: ko.bindingHandlers.value.update
      };
  </code></pre>
  
  <p>input:</p>
  
  <pre><code>&lt;input type="text" data-bind="stringEmptyNull: Ip" /&gt;
  </code></pre>
  
  <p>Model:</p>
  
  <pre><code>var Model = function () {
          this.Ip = ko.observable()
          ko.applyBindings(this, $myForm[0]);
      };
  
      instance = new Model();
  </code></pre>