Have you thought about Cow Hollow? It may not be as trendy as SOMA but its definitely safer. There are plenty of restaurants and plenty of people in their 20s and 30s. Probably a bit more expensive since it is near the Marina. Closer to Ocean Beach than Mission.