Doctors may check immunoglobulin levels to see if a person has an infection or is protected from getting an infection (is immune to it). Doctors also use immunoglobulin tests to help diagnose immunodeficiencies (when the immune system isn't working as it should).