added a check if a prop on __proto__ is a function