I'll be replacing a gas water heater eventually and want to know the right way to install the piping to it. What I have now is copper male NPT sweat fittings threaded directly into the WH; cu tube is then sweated to the fittings at the WH. There is no dielectric union at the WH which I've read you should have for transitioning from steel to cu. It's been this way for 15 yrs and seems to be ok for whatever reason.

So, what is the right way to do this?

3/4 brass pipe nipple, say 4" lg; then a ball valve; then male NPT cu sweat fitting and then to tubing?

I am not in an earthquake area (east TN) so I don't think I would need the copper flex lines, but then again they probably wouldn't be a bad idea, and they do allow a lot of room for piping misalignment.