swapped out hasOwnProperty for object attribute reference check.