Aside from an anaphylactic reaction, it's generally safe to have the vaccine. At the hospital where I work, physicians are recommending that even immunocompromised patients and patients on immunosuppressant drugs get vaccinated. It may take longer for the body to produce an appropriate immune response, but if the immune system is functioning at all there will be some response.
(Disclaimer: Medical professional with over 15 years' experience in the field, double-vaxxed with Pfizer, and my brother is an immunology researcher.)
(Disclaimer: Medical professional with over 15 years' experience in the field, double-vaxxed with Pfizer, and my brother is an immunology researcher.)