diff --git a/core/modules/layout_builder/src/Element/LayoutBuilder.php b/core/modules/layout_builder/src/Element/LayoutBuilder.php
--- a/core/modules/layout_builder/src/Element/LayoutBuilder.php
+++ b/core/modules/layout_builder/src/Element/LayoutBuilder.php
@@ -69,7 +69,7 @@ class LayoutBuilder extends RenderElementBase implements ContainerFactoryPluginI
   public function __construct(array $configuration, $plugin_id, $plugin_definition, EventDispatcherInterface $event_dispatcher, ?EntityTypeManagerInterface $entity_type_manager = NULL) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);

-    if (!$entity_type_manager === NULL) {
+    if ($entity_type_manager === NULL) {
       @trigger_error('Calling ' . __METHOD__ . '() without the $entity_type_manager argument is deprecated in drupal:11.3.0 and will be required in drupal:12.0.0. See https://www.drupal.org/node/2946333', E_USER_DEPRECATED);
       $entity_type_manager = \Drupal::entityTypeManager();
     }
