The safest way to reduce this risk is to use a condom. This protects against HIV and many other infections. If your girlfriend sometimes sleeps with her husband, it sound unlikely that you know whether her husband also sleeps with other people. You can only know about your own health by going for an HIV test yourself.