Casting AActor to pawn

UGameplayStatics::GetAllActorsOfClass(GetWorld(), APawnAITank::StaticClass(), AllActors);
for (AActor* Actor : AllActors)
{
APawnAITank* AITank = Cast(Actor);
AITank->GetController();
// …
}