Implement areIdentical().