I prefer apartments and condos. I need To be in walking distance from work, the grocery store, the gym, the Kickboxing or Muay Thai dojo and the Masjid.
I'd recommend you come and experience the city for your self. I personally never feel unsafe in SF, but I am very aware of my surroundings (depending on the neighborhood i'm in). I never leave things in my car becasue smash and grabs are common. I've never personally known anyone to be physically harmed by any crime in SF and I've been here for over 20 years.
Born and raised here. The crime is really just concentrated in a couple of neighborhoods. Even then, a lot of it is just mental illness. I’ve never felt unsafe. You just have to be aware of your surroundings as well. I don’t carry pepper spray or anything like that.