diff --git a/shorthand.module b/shorthand.module
index ca940b7..0cfd5fb 100755
--- a/shorthand.module
+++ b/shorthand.module
@@ -111,7 +111,7 @@ function shorthand_metatags_alter(array &$metatags, array &$context) {
   }
 
   // Ignore some system routes that are not appropriate for meta tags.
-  if (metatag_is_current_route_supported() && $context['entity']) {
+  if (metatag_is_current_route_supported() && $context['entity'] && $context['entity'] instanceof \Drupal\Core\Entity\FieldableEntityInterface) {
     // Detect shorthand field.
     foreach ($context['entity']->getFieldDefinitions() as $name => $definition) {
 
