remove unnecessary hasOwnProperty calls