Swtiched in operator to hasOwnProperty