Consolidate safeEquals