Replace hasOwnProperty by _.has

Like practiced elsewhere in the code.