diff --git a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php
index 3a59e01..3f41465 100644
--- a/core/lib/Drupal/Core/Entity/EntityDisplayBase.php
+++ b/core/lib/Drupal/Core/Entity/EntityDisplayBase.php
@@ -123,23 +123,18 @@
    * {@inheritdoc}
    */
   public function __construct(array $values, $entity_type) {
-    if (!isset($values['targetEntityType']) || !isset($values['bundle'])) {
-      throw new \InvalidArgumentException('Missing required properties for an EntityDisplay entity.');
-    }
-
-    if (!$this->entityManager()->getDefinition($values['targetEntityType'])->isSubclassOf('\Drupal\Core\Entity\FieldableEntityInterface')) {
-      throw new \InvalidArgumentException('EntityDisplay entities can only handle fieldable entity types.');
-    }
+    assert('isset($values[\'targetEntityType\']) && isset($values[\'bundle\'])', 'Missing required properties for an EntityDisplay entity.');
+    assert('is_string($values[\'targetEntityType\'])');
+    assert('is_string($values[\'bundle\'])');
+    assert('$this->entityManager()->getDefinition($values[\'targetEntityType\'])->isSubclassOf(\'\Drupal\Core\Entity\FieldableEntityInterface\')', 'EntityDisplay entities can only handle fieldable entity types.');
+    // A plugin manager and a context type need to be set by extending classes.
+    assert('isset($this->pluginManager)', 'Missing plugin manager. The plugin manager must be set before parent::__construct() is called.');
+    assert('isset($this->displayContext)', 'Missing display context type. The display context type must be set before parent::__construct() is called.');
+    assert('$this->pluginManager instanceof \Drupal\Core\Field\FormatterPluginManager');
+    assert('is_string($this->displayContext)');
 
     $this->renderer = \Drupal::service('renderer');
 
-    // A plugin manager and a context type needs to be set by extending classes.
-    if (!isset($this->pluginManager)) {
-      throw new \RuntimeException('Missing plugin manager.');
-    }
-    if (!isset($this->displayContext)) {
-      throw new \RuntimeException('Missing display context type.');
-    }
 
     parent::__construct($values, $entity_type);
 
