This will virtually never happen. If you're worried about it, put an early return (if (name === 'hasOwnProperty') return). End of story.
Allow what you want to allow and disallow everything else.
This is like saying "oh, but nobody will ever insert SQL in our forms!"
This will virtually never happen. If you're worried about it, put an early return (if (name === 'hasOwnProperty') return). End of story.