this should be `typeof people[i].father !== 'undefined'` https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof