Move hasOwnProperty check into has