Don't mask AttributeErrors that are really issues with the call to EqHash itself. Also support type-checking the equality argument; this is discouraged, but was used in some parts of the codebase and is needed in some few circumstances.