Non-Null Typecasting Validations

Another one such newbie C++ question, that hopefully benefits others with its answer. What is the equivalent of this in Rocket++ (Rocket C++):

if (TypeCastActor(TestActor) != none)
{
}

I had been reading about how “boost” was supposed to offer this sort of type-checking functionality. But do I really need to learn ANOTHER library just to do what unrealscript handled innately?

You can either do:

if(Cast(TestActor) != NULL)
{

or

if( TestActor->IsA(APawn::StaticClass()) )
{

And there is CastChecked instead of Cast if you want it to assert if it isn’t of that type (this turns into a non-checking cast in shipping builds).