diff --git a/core/modules/serialization/src/Normalizer/NormalizerBase.php b/core/modules/serialization/src/Normalizer/NormalizerBase.php
index 8779b1a..c796ab8 100644
--- a/core/modules/serialization/src/Normalizer/NormalizerBase.php
+++ b/core/modules/serialization/src/Normalizer/NormalizerBase.php
@@ -60,7 +60,7 @@ public function supportsDenormalization($data, $type, $format = NULL) {
       return (class_exists($name) || interface_exists($name)) && is_subclass_of($type, $name, TRUE);
     };
 
-    return in_array($type, $supported) || array_filter($supported, $subclass_check);
+    return in_array($type, $supported, TRUE) || array_filter($supported, $subclass_check);
   }
 
   /**
diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php
index 63b9bf7..acdfea5 100644
--- a/core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php
+++ b/core/modules/serialization/tests/src/Unit/Normalizer/NormalizerBaseTest.php
@@ -61,6 +61,50 @@ public function providerTestSupportsNormalization() {
     ];
   }
 
+  /**
+   * Tests the supportsDenormalization method.
+   *
+   * @dataProvider providerTestSupportsDenormalization
+   *
+   * @param bool $expected_return
+   *   The expected boolean return value from supportDenormalization.
+   * @param mixed $data
+   *   The data passed to supportsNormalization.
+   * @param string $supported_interface_or_class
+   *   (optional) The supported interface or class to set on the normalizer.
+   */
+  public function testSupportsDenormalization($expected_return, $data, $supported_interface_or_class = NULL, $supported_types) {
+    $normalizer_base = $this->getMockForAbstractClass('Drupal\Tests\serialization\Unit\Normalizer\TestNormalizerBase');
+
+    if (isset($supported_types)) {
+      $normalizer_base->setSupportedInterfaceOrClass($supported_types);
+    }
+
+    $this->assertSame($expected_return, $normalizer_base->supportsDenormalization($data, $supported_interface_or_class));
+  }
+
+  /**
+   * Data provider for testSupportsDenormalization.
+   *
+   * @return array
+   *   An array of provider data for testSupportsDenormalization.
+   */
+  public function providerTestSupportsDenormalization() {
+    $supported_types = array(
+      1.10,
+      '123',
+      '1.13',
+    );
+    return [
+      // If string '1.10' type is passed should return FALSE.
+      [FALSE, new \stdClass(), '1.10', $supported_types],
+      // If integer 123 is passed should return FALSE.
+      [FALSE, new \stdClass(), 123, $supported_types],
+      // If float 1.13 is passed should return FALSE.
+      [FALSE, new \stdClass(), 1.13, $supported_types],
+    ];
+  }
+
 }
 
 /**
