You might want to put that shut off valve on the cold water inlet side of your hot water tank. This is the way EVERY hot water tank is plumbed by code and for good reason. If the tank fails, you can easily shut off all water to both the tank and the hot water line at once.