I would unplug the machine from the wall outlet before swapping a ballast. If the cord has been replaced incorrectly or installed incorrectly from the factory (neutral and hot reversed), you could get shocked, even with the machine turned off. This is extremely unlikely but better safe than sorry!