It is safe to have an MRI with a pacemaker, as newer models are MRI-conditional. But you'll still need to talk with your doctor beforehand.