protected function mergeAttribute(string $key, $mergeValue)
    {
        $current = $this[$key];

        if ($current instanceof DataObjectInterface && method_exists($current, 'merge')) {

            $class = get_class($current);

            if (is_array($mergeValue)) {
                $mergeValue = new $class($mergeValue);
            }

            // If we have nothing to merge with, don't bother
            if (null === $mergeValue) {
                return;
            }

            $mergeValue = $current->merge($mergeValue);
        }

        if (null === $mergeValue) {
            return;
        }

        $this[$key] = $mergeValue;
    }