Move repr id checks to primitives