Although the walk down Market isn't very interesting until you get to SF Center, it isn't unsafe. You'll see some "interesting" characters, but in all the years I've lived here and walked that stretch, I've never been bothered, except for the occasional request for spare change. You can also walk down to Mission or Howard and then over to Moscone.