Cast object to class variable in Blueprint?

but, what do you want to do? this looks like an XY problem

maybe If you don’t know the class to cast, you could use an interface