diff --git a/src/Plugin/Block/ForwardLinkBlock.php b/src/Plugin/Block/ForwardLinkBlock.php
index ec081d8..6acd5b5 100644
--- a/src/Plugin/Block/ForwardLinkBlock.php
+++ b/src/Plugin/Block/ForwardLinkBlock.php
@@ -124,6 +124,7 @@ class ForwardLinkBlock extends BlockBase implements ContainerFactoryPluginInterf
   public function isAllowed() {
     $allowed = FALSE;
     $entity = NULL;
+    $bundle = NULL;
 
     $parameters = $this->routeMatch->getParameters();
     if ($parameters->has('node')) {
@@ -139,7 +140,7 @@ class ForwardLinkBlock extends BlockBase implements ContainerFactoryPluginInterf
       $bundle = '';
     }
 
-    if ($entity) {
+    if ($entity && $entity instanceof EntityInterface) {
       $view_mode = 'full';
       $this->entity = $entity;
       $allowed = $this->accessChecker->isAllowed($this->settings, $entity, $view_mode, $entity->getEntityTypeId(), $bundle);
