How IsChildOf() works with an array of classes?

Hey, simply :
if FilterClassElement is a class object, then :

 for (auto& FilterClassElement : FilterClasses)
     {
         if (HitElement.Actor->GetClass()->IsChildOf(Cast<UClass>(FilterClassElement)) 
         {
             // Stuff here
         }
     }

if FilterClassElement is an object of the class, then :

 for (auto& FilterClassElement : FilterClasses)
     {
         if (HitElement.Actor->GetClass()->IsChildOf(FilterClassElement->GetClass())
         {
             // Stuff here
         }
     }