Add == method for comparison.