title: YDN-DB How to verify if a record exists?
body: <p>I'm trying to verify if a specific record exist inside a table by a given ID. For example:</p>
  
  <pre><code>var id = 23;
  db.count('products',id).done(function(count) {
      if(count&gt;0){
          db.get('products',id).done(function(r) {
              //Do something
          });
      }else{
          alert('No product found');
      }
  });
  </code></pre>
  
  <p>When I try this, I get the following error: <code>uncaught exception: null</code></p>
  
  <p>I'd really appreciate your help Thanks!.</p>