title: How can I check if a value exists in Google Chrome?
body: <p>I am working on a Google Chrome extension, and I have a problem with the storage API. I want to check if a key exists, and if it does, delete it.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>"permissions": [
      "activeTab",
      "https://ajax.googleapis.com/",
      "storage"
    ],
  </code></pre>
  
  <p>Manifest.json:</p>
  
  <pre><code>chrome.storage.sync.get(this.name, function(items) {
    chrome.storage.remove(items);
  });
  </code></pre>
  
  <p>However, I am getting the following error:</p>
  
  <blockquote>
    <p>TypeError: Cannot read property 'sync' of undefined</p>
  </blockquote>