Are the buses and trams actually safe?

I came to SF from NYC just a few hours ago. I was thinking about using the buses and Muni, but I'm not sure how safe it is.