Hmm. I'm really not sure. I used to say that you should write what you want to read. If it's good then other people will want to read it too.
But I've just finished writing a zombie novel. A comic zombie novel told from the first person perspective of a very polite vegetarian zombie who doesn't eat anyone. The first couple of pages are in the horror SYW, if you'd like to take a look (shameless plug!).
And then I've joined this website only to be told that zombie novels are yesterday's news. No agents are repping zombie novels. If you haven't already got a publishing deal, then forget it. Come back in a decade or two.
All of which suggests to me that you can't ignore genre altogether. No matter how wonderful your book is, the agent will need to know how to pitch it, the publisher will need to have confidence that it will make money, the bookshop owner will need to know what shelf to put it on and a deeply suspicious reader will need to be convinced to part with their hard-earned.
It's bad enough persuading the reader to have faith in an unknown. It's doubly hard if you've chosen a tricky, contentious or overworked genre.
Zombie comedy, anyone? Anyone?