protected function canCastToNonNullableType(Type $type): bool
    {
        if ($type instanceof ArrayType) {
            if ($type instanceof GenericArrayType) {
                return $this->canCastToGenericArrayKeys($type) &&