Will & Grace' alone should make the argument that gay characters are by no means the kiss of death for a show. There's no sign that these kinds of characters are bad for ratings.
These kinds of shows are good vehicles for future leading men and women.
These kinds of characters are so satisfying to male viewers because culture has told them to be powerful and effective and to get things done, and at the same time they're living, operating and working in places that are constantly defying that.