Use Object.prototype.hasOwnProperty where typeof object.hasOwnProperty
is not 'function', better fix for "TypeError: Object object has no
method 'hasOwnProperty'"