Factorize type name equality checks in CheckIO

Hi,

This mechanical patch factorizes code a bit in CheckIO by adding a utility function returning whether a type name matches another one, possibly prefixed by some value. Thanks to consider merging.

Cheers,
  Simon