Added hasOwnProperty tests when required to be robust to random properties added to he Object prototype