diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php
index 55d0e3f..027df70 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Formatter/FormatterPluginManager.php
@@ -53,10 +53,13 @@ public function getInstance(array $options) {
     // Switch back to default formatter if either:
     // - $type_info doesn't exist (the widget type is unknown),
     // - the field type is not allowed for the widget.
-    if (!isset($definition['class']) || !in_array($field['type'], $definition['field_types'])) {
+    if (!$definition || !in_array($field['type'], $definition['field_types'])) {
       // Grab the default widget for the field type.
       $field_type_definition = field_info_field_types($field['type']);
       $type = $field_type_definition['default_formatter'];
+      if (!$this->getDefinition($type)) {
+        throw new \RuntimeException(t('No valid formatter could be found for field type @type.', array('@type' => $field['type'])));
+      }
     }
 
     $configuration = array(
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
index 5722807..082e516 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Type/Widget/WidgetPluginManager.php
@@ -55,10 +55,13 @@ public function getInstance(array $options) {
     // Switch back to default widget if either:
     // - $type_info doesn't exist (the widget type is unknown),
     // - the field type is not allowed for the widget.
-    if (!isset($definition['class']) || !in_array($field['type'], $definition['field_types'])) {
+    if (!$definition || !in_array($field['type'], $definition['field_types'])) {
       // Grab the default widget for the field type.
       $field_type_definition = field_info_field_types($field['type']);
       $type = $field_type_definition['default_widget'];
+      if (!$this->getDefinition($type)) {
+        throw new \RuntimeException(t('No valid widget could be found for field type @type.', array('@type' => $field['type'])));
+      }
     }
 
     $configuration = array(
