JavaScript curried hasOwn helper