Extract helper for testing equality
Use helper across the board