object functions can handle hasOwnProperty override

The way I would suggest is `obj = Object(obj)` at the start of the function