diff --git a/inc/tokens.inc b/inc/tokens.inc
index 14778ba..864bf05 100644
--- a/inc/tokens.inc
+++ b/inc/tokens.inc
@@ -107,6 +107,11 @@ function template_whisperer_tokens($type, $tokens, array $data, array $options,
     $usages = $tw_manager_usage->listUsage($suggestion);
     $usage = reset($usages);
 
+    // Prevent lookup when the suggestion is never used.
+    if (!$usage) {
+      return $replacements;
+    }
+
     $entity_type_manager = \Drupal::service('entity_type.manager');
     $entity_storage = $entity_type_manager->getStorage($usage->type);
     $entity = $entity_storage->load($usage->id);
diff --git a/tests/src/Functional/SuggestionTokenReplaceTest.php b/tests/src/Functional/SuggestionTokenReplaceTest.php
index a53cc3a..fde60fe 100644
--- a/tests/src/Functional/SuggestionTokenReplaceTest.php
+++ b/tests/src/Functional/SuggestionTokenReplaceTest.php
@@ -27,10 +27,17 @@ class SuggestionTokenReplaceTest extends TemplateWhispererTestBase {
   /**
    * Collection of Template Whisperer test entites.
    *
-   * @var Drupal\template_whisperer\Entity\TemplateWhispererSuggestionEntity[]
+   * @var \Drupal\template_whisperer\Entity\TemplateWhispererSuggestionEntity[]
    */
   private $suggestions;
 
+  /**
+   * The node with an attached suggestion for this tests.
+   *
+   * @var \Drupal\node\NodeInterface
+   */
+  protected $testNode;
+
   /**
    * {@inheritdoc}
    *
@@ -77,25 +84,26 @@ protected function setUp() {
         'field_name'  => 'field_template_whisperer',
         'bundle'      => 'article',
       ])->save();
-  }
-
-  /**
-   * Creates a suggestion, then tests the tokens generated from it.
-   */
-  public function testSuggestionTokenReplacement() {
-    $token_service = \Drupal::token();
-    $language_interface = \Drupal::languageManager()->getCurrentLanguage();
 
     // Create a default entity & attache a suggestion.
-    $node = $this->drupalCreateNode(['type' => 'article']);
+    $this->testNode = $this->drupalCreateNode(['type' => 'article']);
 
     $target_id = $this->suggestions['foo']->getSuggestion();
-    $node->field_template_whisperer->target_id = $target_id;
-    $node->save();
+    $this->testNode->field_template_whisperer->target_id = $target_id;
+    $this->testNode->save();
 
     // Create the usage entry.
     $twSuggestionUsage = $this->container->get('template_whisperer.suggestion.usage');
-    $twSuggestionUsage->add($this->suggestions['foo'], 'template_whisperer', $node->getEntityTypeId(), $node->id());
+    $twSuggestionUsage->add($this->suggestions['foo'], 'template_whisperer', $this->testNode->getEntityTypeId(), $this->testNode->id());
+
+  }
+
+  /**
+   * Test the token works with valid parameters.
+   */
+  public function testSuggestionTokenReplacement() {
+    $token_service = \Drupal::token();
+    $language_interface = \Drupal::languageManager()->getCurrentLanguage();
 
     // Tokens options.
     $options = ['langcode' => $language_interface->getId()];
@@ -112,13 +120,43 @@ public function testSuggestionTokenReplacement() {
 
     // Chainable Lookup -> Entity tokens.
     $replacement = $token_service->replace('[suggestion:lookup:foo:entity:nid]', [], $options);
-    $this->assertEqual($replacement, $node->id());
+    $this->assertEqual($replacement, $this->testNode->id());
     $replacement = $token_service->replace('[suggestion:lookup:foo:entity:url]', [], $options);
-    $this->assertEqual($replacement, $node->toUrl('canonical', ['absolute' => TRUE])->toString());
+    $this->assertEqual($replacement, $this->testNode->toUrl('canonical', ['absolute' => TRUE])->toString());
 
     // Tests invalide token for node.
     $replacement = $token_service->replace('[suggestion:lookup:foo:entity]', [], $options);
     $this->assertEqual($replacement, '[suggestion:lookup:foo:entity]');
   }
 
+  /**
+   * Test the token works with unexisting lookup suggestion.
+   */
+  public function testSuggestionTokenUnexistingSuggestion() {
+    $token_service = \Drupal::token();
+    $language_interface = \Drupal::languageManager()->getCurrentLanguage();
+
+    // Tokens options.
+    $options = ['langcode' => $language_interface->getId()];
+
+    // Tests inexisting suggestion.
+    $replacement = $token_service->replace('[suggestion:lookup:baz:entity:id]', [], $options);
+    $this->assertEqual($replacement, '[suggestion:lookup:baz:entity:id]');
+  }
+
+  /**
+   * Test the token works with unused lookup suggestion.
+   */
+  public function testSuggestionTokenUnusedSuggestion() {
+    $token_service = \Drupal::token();
+    $language_interface = \Drupal::languageManager()->getCurrentLanguage();
+
+    // Tokens options.
+    $options = ['langcode' => $language_interface->getId()];
+
+    // Tests existing but non-used suggestion.
+    $replacement = $token_service->replace('[suggestion:lookup:bar:entity:id]', [], $options);
+    $this->assertEqual($replacement, '[suggestion:lookup:bar:entity:id]');
+  }
+
 }
