title: Error with async js function and logging
body: <p>I have this function with callbacks:</p>
  
  <pre><code>function getStorageByKey(key, callback) {
    chrome.storage.sync.get(key, function(obj, callback) {
      var error = chrome.runtime.lastError;
         if (error) {
             console.error(error);
         }
    callback(obj)
    });
  }
  </code></pre>
  
  <p>I'm trying to log it's output like this:</p>
  
  <pre><code>  getStorageByKey('hidden_threads', function (data) {
        console.log(data);
    });
  </code></pre>
  
  <p>I'm receiving the following error:</p>
  
  <pre><code>Error in response to storage.get: TypeError: callback is not a function
      at Object.callback (chrome-extension://nnaebcfbeghbbdkcgdicmlagdblheccm/content.js:37:3)
      at getStorageByKey (chrome-extension://nnaebcfbeghbbdkcgdicmlagdblheccm/content.js:32:23)
      at HTMLDocument.&lt;anonymous&gt; (chrome-extension://nnaebcfbeghbbdkcgdicmlagdblheccm/content.js:8:3)
      at j (chrome-extension://nnaebcfbeghbbdkcgdicmlagdblheccm/jquery.min.js:2:29999)
      at k (chrome-extension://nnaebcfbeghbbdkcgdicmlagdblheccm/jquery.min.js:2:30313)
  </code></pre>