Clean up some equality checks