Spawning a projectile

My projectile is already set, I did it by C++ code. In my Character.h I call the projectile using

TSubclassOf<class AProjectile> ProjectileClass;

In the Character.cpp I use an if statement to check if my ProjectileClass is true, but is not.