If the metal you have in your body is not close to the pancreas, they can do a CAT scan, which is radiation like X-rays rather than a magnetic field of MRI, so metal doesn't goof the whole thing up. They can also do a needle biopsy, too, the CAT scan guides the surgeon to the correct place, but the amount of tissue that needle can take is sometimes too small to be sure if the mass is benign, but if it shows up as a cancer, well, they will likely want to do surgery and so forth.