Equals method, to compare two units