Simpler way to write it and with null check.
if (Item && Item->IsA(ABaseItem::StaticClass())) { // do something }