Using `hasOwnProperty` is a good habit when writing javascript that might execute in older browsers like IE 6 & 7. But for server side JS, you don't have to worry about it. This will work fine:

    if (query.callback) {

Any property you attempt to access on an object that does not exist evaluates to `undefined`, which is a falsey value within conditions.