typically an inventory holds objects not the classes of the objects.
we would use a structure holding classes, if we wanted to know the types of things in the inventory, where we no longer have say a specific car in the inventory, we have the concept of a car.
we can do some stuff with the class like spawn things, but we have no data to back it up.
think on the class as getting a blueprint of the thing, but none of the values actually exist.
Try changing the inventory to be an array of Object-References instead of array of Class-References
also the Cast<T> node requires something plugged into the Object Pin otherwise it WILL throw an error.