I’d deal with it by never in a million years being on an empty city street at 11pm. But that’s just me.
I don't generally do this either but walking back to my car after attending a ballgame has taken me on some city streets that didn't have very many people on them. Same could happen leaving a concert or other type activity.