diff --git a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
index 6e6a74f..9ec48b6 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
@@ -508,7 +508,9 @@ protected function cleanIds(array $ids) {
     $id_definition = $definitions[$this->entityType->getKey('id')];
     if ($id_definition->getType() == 'integer') {
       $ids = array_filter($ids, function ($id) {
-        return is_numeric($id) && $id == (int) $id;
+        $pass = is_numeric($id) && $id == (int) $id;
+        assert($pass,  $id . ' is not an integer');
+        return $pass;
       });
       $ids = array_map('intval', $ids);
     }
