In Central America, Costa Rica is the best of the alternatives, but the whole world is an increasingly dangerous place. Try Detroit, for example. Or, the heavily Moslem city of Malmo, Sweden - even the police are scared there.
I was there once and encountered no problems; Playa Carrillo and Samara Beach on the Nicoya Peninsula. My cab stalled on a quiet residential street. I was a bit unnerved when the local men came from their homes and approached. I felt guilty later after they did all they could to get the cab going again. The cab eventually started and we were on our way.
I've surfed since 1971 and Costa Rica has some of the best beaches in the world. Of course you must encounter the indigenous people to go there but that's not necessarily a bad thing.