Best way to check class type in C++

Do you know if this is faster and more efficient then my solution? With this one we are calling a function to get the static class, then we are calling another function called IsA().

Not saying its wrong, I’m just not sure what is better.