diff --git a/core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php b/core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php
index a0598fa1d1..c97490e4fd 100644
--- a/core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php
+++ b/core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php
@@ -7,6 +7,7 @@
 use Drupal\Core\Config\ConfigManagerInterface;
 use Drupal\Core\Config\Entity\ConfigEntityStorage;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
+use Drupal\workflows\WorkflowInterface;
 
 /**
  * Check moderation states are not being used before updating workflow config.
@@ -85,12 +86,15 @@ public function onConfigImporterValidate(ConfigImporterEvent $event) {
    *   An entity object. NULL if no matching entity is found.
    */
   protected function getWorkflow($config_name) {
-    $entity_type_id = $this->configManager->getEntityTypeIdByName($config_name);
-    /** @var \Drupal\Core\Config\Entity\ConfigEntityTypeInterface $entity_type */
-    $entity_type = $this->entityTypeManager->getDefinition($entity_type_id);
-    $entity_id = ConfigEntityStorage::getIDFromConfigName($config_name, $entity_type->getConfigPrefix());
-    /** @var \Drupal\workflows\WorkflowInterface $workflow */
-    return $this->entityTypeManager->getStorage($entity_type_id)->load($entity_id);
+    if ($entity_type_id = $this->configManager->getEntityTypeIdByName($config_name)) {
+      /** @var \Drupal\Core\Config\Entity\ConfigEntityTypeInterface $entity_type */
+      $entity_type = $this->entityTypeManager->getDefinition($entity_type_id, FALSE);
+      $entity_id = ConfigEntityStorage::getIDFromConfigName($config_name, $entity_type->getConfigPrefix());
+      $entity = $this->entityTypeManager->getStorage($entity_type_id)->load($entity_id);
+      if ($entity instanceof WorkflowInterface) {
+        return $entity;
+      }
+    }
   }
 
 }
