Coin pickup counter with UE5 and C++

I just solved the second one.
For the widget problem, how can I check if BP_ThirdPersonChar type is my custom character class?