C++ UClass comparison

Is there a way to do a uclass comparison in C++? The if actoritr comparison doent seem to work in this little snippet of code

    	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Item)
    		TSubclassOf<class AInstancedItem> InstancedItemClass;

        InstancedItemClass = AInstancedItem::StaticClass();
        for (TObjectIterator<AInstancedItem> ActorItr; ActorItr; ++ActorItr)
            if (ActorItr->StaticClass() == InstancedItemClass)

1.In instantiated objects you should use GetClass() instead of StaticClass()

2.There is IsA():

But if i’m not mistaken IsA return true if you input base class

Thank you!