How to Hide Elements based off other empty Elements?

This last code worked like a charm for me!
Just replace the item names, and it should work.