Adding 'obj.hasOwnProperty' check.