Simplify object equality check