diff --git a/uw_cfg_common.module b/uw_cfg_common.module
index 706db74adc4d88aa0e0c89e1c51ecf1e5b94e9df..9b3c85d1212d0e645f25ced16714ec5d0bcd0a41 100644
--- a/uw_cfg_common.module
+++ b/uw_cfg_common.module
@@ -48,6 +48,7 @@ function uw_cfg_common_preprocess_form_element_label(&$variables) {
   // the id of the label contains edit-field-uw and has
   // either summary or position in the id.
   if (
+    isset($variables['element']['#id']) &&
     $variables['element']['#id'] !== 'edit-field-uw-blank-summary-value' &&
     str_contains($variables['element']['#id'], 'edit-field-uw-') &&
     (