diff --git a/src/Callbacks/AttributeGroupNamesValidatorCallback.php b/src/Callbacks/AttributeGroupNamesValidatorCallback.php
index <HASH>..<HASH> 100644
--- a/src/Callbacks/AttributeGroupNamesValidatorCallback.php
+++ b/src/Callbacks/AttributeGroupNamesValidatorCallback.php
@@ -85,9 +85,12 @@ class AttributeGroupNamesValidatorCallback extends IndexedArrayValidatorCallback
             // load the validations for the attribute set with the given name
             $validations = $this->getValidations($attributeSetName, $subject->getValue(ColumnKeys::ENTITY_TYPE_CODE));
 
-            $attributeGroupName = $attributeGroupNames[$key];
+            $attributeGroupName = null;
+            if (isset($attributeGroupNames[$key])) {
+                $attributeGroupName = $attributeGroupNames[$key];
+            }
             // query whether or not the value is valid
-            if (isset($attributeGroupNames[$key]) && in_array($attributeGroupName, $validations)) {
+            if (in_array($attributeGroupName, $validations)) {
                 continue;
             }
refactoring php notices