Do not access Object.prototype method 'hasOwnProperty' from target object
let events = {"some-index": false};
let key = "some-index";
if(Object.prototype.hasOwnProperty.call(events, key)) {
// This would compile without any issue !
console.log("The object has the property");
}