If you don't know your genre when you're pitching a publisher or agent, then you're likely to get a big fat rejection.
Why? Because they need to know where you fit into their line. Bookstores need to know how to sell you and where to place you on the bookshelf. I came across this youtube video which touches on the subject.