diff --git a/core/lib/Drupal/Core/Render/Element.php b/core/lib/Drupal/Core/Render/Element.php
index 75c3ab74017409c477461627a3d6f3b5df2f3b9c..dfd4eb099d36f2a052e1bd14f0455abedfb48294 100644
--- a/core/lib/Drupal/Core/Render/Element.php
+++ b/core/lib/Drupal/Core/Render/Element.php
@@ -24,7 +24,7 @@ class Element {
    *   TRUE of the key is a property, FALSE otherwise.
    */
   public static function property($key) {
-    return is_string($key) && $key[0] == '#';
+    return $key[0] == '#';
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/Core/Render/ElementTest.php b/core/tests/Drupal/Tests/Core/Render/ElementTest.php
index 5de025b371927c800ac5c3f4632a2e7be50b6394..a09cb3f61febfe4adbdfb7ffdd6a54619312a385 100644
--- a/core/tests/Drupal/Tests/Core/Render/ElementTest.php
+++ b/core/tests/Drupal/Tests/Core/Render/ElementTest.php
@@ -19,7 +19,6 @@ public function testProperty() {
     $this->assertTrue(Element::property('#property'));
     $this->assertFalse(Element::property('property'));
     $this->assertFalse(Element::property('property#'));
-    $this->assertFalse(Element::property(0));
   }
 
   /**
@@ -30,16 +29,13 @@ public function testProperties() {
       '#property1' => 'property1',
       '#property2' => 'property2',
       'property3' => 'property3',
-      0 => [],
     ];
 
     $properties = Element::properties($element);
 
-    $this->assertCount(2, $properties);
     $this->assertContains('#property1', $properties);
     $this->assertContains('#property2', $properties);
     $this->assertNotContains('property3', $properties);
-    $this->assertNotContains(0, $properties);
   }
 
   /**