ec.c (eccurve_pyrichcompare): Check that second operand has correct type.