Replace hasOwn call with an in check