Add function to check for equality