Best way to compare actors in C++?

Perhaps I’m doing this stupidly to begin with, would it be better if I compared the static mesh that the object has against the static mesh of the object collided with?