Checking that an upgrade is correct and is compatible with the currently deployed governance state. This will check that for example AMM contract is being upgraded with an AMM contract and not by a token contract.
Generic governance upgrades are inherently risky, because it’s an upgrade of the contract itself. Before application of a passed generic proposal, a test will be run that library calls a health check function on the governance (or core protocol, governance token,...) contract to ensure that it’s truly a contract of the same type (of version higher than current to ensure no incompatibilities).