protected function shouldSkip($object, $propertyPath)
    {
        if (!\is_object($object) && !\is_array($object)) {
            return false;
        }

        if (!empty($propertyPath)) {
            $parts = \explode('.', $propertyPath);
            $accessor = new PropertyAccessor();
            $parent = $object;
            foreach ($parts as $childSubPath) {
                if ($parent instanceof EntityInterface && $this->shouldSkipObjectProperty($parent, $childSubPath)) {
                    return true;
                }

                if ($accessor->isReadable($parent, $childSubPath)) {
                    $parent = $accessor->getValue($parent, $childSubPath);
                } else {
                    return false;
                }
            }
        }

        return false;
    }