diff --git a/core/lib/Drupal/Core/Entity/ContentUninstallValidator.php b/core/lib/Drupal/Core/Entity/ContentUninstallValidator.php
index ac76d9a751..9fbdf92438 100644
--- a/core/lib/Drupal/Core/Entity/ContentUninstallValidator.php
+++ b/core/lib/Drupal/Core/Entity/ContentUninstallValidator.php
@@ -40,12 +40,19 @@ public function validate($module) {
     $entity_types = $this->entityTypeManager->getDefinitions();
     $reasons = [];
     foreach ($entity_types as $entity_type) {
-      if ($module == $entity_type->getProvider() && $entity_type instanceof ContentEntityTypeInterface && $this->entityTypeManager->getStorage($entity_type->id())->hasData()) {
-        $reasons[] = $this->t('There is content for the entity type: @entity_type. <a href=":url">Remove @entity_type_plural</a>.', [
-          '@entity_type' => $entity_type->getLabel(),
-          '@entity_type_plural' => $entity_type->getPluralLabel(),
-          ':url' => Url::fromRoute('system.prepare_modules_entity_uninstall', ['entity_type_id' => $entity_type->id()])->toString(),
-        ]);
+      try {
+        if ($module == $entity_type->getProvider() && $entity_type instanceof ContentEntityTypeInterface && $this->entityTypeManager->getStorage($entity_type->id())->hasData()) {
+          $reasons[] = $this->t('There is content for the entity type: @entity_type. <a href=":url">Remove @entity_type_plural</a>.', [
+            '@entity_type' => $entity_type->getLabel(),
+            '@entity_type_plural' => $entity_type->getPluralLabel(),
+            ':url' => Url::fromRoute('system.prepare_modules_entity_uninstall', ['entity_type_id' => $entity_type->id()])->toString(),
+          ]);
+        }
+      } catch (\Throwable $th) {
+        // An exception here means that the table does not exist. That means
+        // there is no data. This exception is caught to allow to uninstall
+        // modules with incorrectly installed entity types.
+        return $reasons = [];
       }
     }
     return $reasons;
diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php
index 0e65544633..c8dd31be8d 100644
--- a/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Entity/EntitySchemaTest.php
@@ -349,6 +349,10 @@ public function testCleanUpStorageDefinition() {
     // Ensure that there are storage definitions from the entity_test module.
     $this->assertNotEqual($entity_type_id_count, 0, 'There are storage definitions provided by the entity_test module in the schema.');
 
+    // Manually drop one of the test entity type tables to simulate a scenario
+    // where a table was not created or an entity type is new.
+    \Drupal::database()->schema()->dropTable('entity_test');
+
     // Uninstall the entity_test module.
     $this->container->get('module_installer')->uninstall(['entity_test']);
 
