Function to test thing equality cleanly