My Inventory System looks similar to this (snippet)
I recommend looking at how other games implement their inventory.It’s always a help to visualize class hierarchies with UML Diagrams. This can show problems with references etc.