I suggest that you just go, you are just as likley to get mugged in your own town as you are in any part of Africa.
I have been to 20 African coutries and have never been a victim of crime.
However, there are basic rules:
Always register with your local consulate in the country you are visiting, and ask then where not to go, every country has their no-go areas. Also, if you are driving, never, ever, ever give a lift to anyone, even if them seem very friendly. Do not visibly flash cash or jewelry around.
On the other hand don't worry about making friends, on the whole the African people are the friendliest people on the planet and want nothing more that an overseas penpal.
Now off you go and enjoy your visit.