Fix issue with testing equality of objects with None values