The usual pattern we use for equals is: 

```javascript
return left === right || 
         typeof left !== 'undefined' && 
         typeof right !== 'undefined' && 
         // rest of the property comparisons
```