Brass should be fine, although the state of California has determined that use of brass nipples will kill you and they've outlawed them. They use stainless there. So you could use brass or stainless if you're concerned about the brass. Since you're not generally drinking heated water, the exposure factor is minimal. Don't use plastic. Under uncontrolled conditions, the water heater can reach temps that will damage the plastic. CPVC has a higher temperature rating of 200F, inadequate for use as a nipple or direct tank connection. PVC is lower. Regardless of the technical details, it's simply inappropriate for that application. Brass, stainless, a PEX adapter, whatever. Many water heaters ship with a dielectric nipple, it's plated steel with a plastic liner, they work fine, and use of a CPVC adapter on that is OK, although I doubt that your vessel's fitted with CPVC, more likely PEX or some variation of polyethylene. So, brass is good!