The number of times I have taken the subway to and from Parkchester in the Bronx late at night and have had no problems......However, that's me!
I'm not saying things won't happen, but the subways, IMO, are relatively safe. Like I've said in many posts, use common sense, and don't start none, won't be none!
But to add, if you can afford a cab and you feel more comfortable, then by all means take it! But if you do take the subway, you may want to stay in the mid-cars, near the conductor section (that's part of the common sense instructions).