Benefit of using Object.hasOwnProperty vs. testing if a property is undefined