If you are sure that you visiting such relatives will definitely make
you fall in to sinful acts like shaking hands with the opposite gender
or eating or drinking Haraam food, then you should not visit them
If such sinful acts are not there but the female members who are
not wearing Hijab will come in front of you, you can avoid looking at them by lowering your gaze.