safer hasOwnProperty access