You can be on the safe side in a situation that is potentially dangerous in a way, and it means that you do something to avoid the danger. For example, you can say:
- I didn’t feel well tonight, and to be on the safe side [not to make it any worse], I didn’t drink any alcohol at the party.
- My mother-in-law is a picky eater, so when she was coming over, I asked her in advance what she would like to eat, to be on the safe side [to avoid an embarrassing moment during the meal].
If you say “just to be on the safe side”, it means that the bad scenario is unlikely, but you did something to prevent it anyway, just in case; for example:
- I consider myself a healthy person, but I got my testosterone levels tested, just to be on the safe side [just to be sure nothing is wrong].