Use Object.prototype.hasOwnProperty where appropriate

Change-Id: I87042869955337ebb46d4e0abf05d0327ccfdaee
Merge "Use Object.prototype.hasOwnProperty where appropriate"