make sure `ctx.passport` isn't undefined before using `in` operator

Within function `getObject`, if `ctx.passport` is undefined, there will throw a `[TypeError:  Cannot use 'in' operator to search for 'body' in undefined]`.