Prevent 'query' event from being emitted if there's no query object.
Merge pull request #3 from multoncore/master

Prevent 'query' event from being emitted if there's no query object.