Use hasOwnProperty instead of 'key in obj'

Change-Id: I48f044c547b48a97cdfb31f7b887dca0ed7e341b
Merge "Use hasOwnProperty instead of 'key in obj'"