title: Is there a way that I can check if a data attribute exists?
body: <p>Is there some way that I can run the following:</p>
  
  <pre><code>var data = $("#dataTable").data('timer');
  var diffs = [];
  
  for(var i = 0; i + 1 &lt; data.length; i++) {
      diffs[i] = data[i + 1] - data[i];
  }
  
  alert(diffs.join(', '));
  </code></pre>
  
  <p><strong>Only</strong> if there is an attribute called data-timer on the element with an id of #dataTable?</p>