material id channel selection

Hi there, I use material id channels a lot in my scenes for further editing in Photoshop. But sometimes I assign the same channel to two materials by accident and then have a mess in my multimat RGB render. Does anyone have a script or know a way to view which materials have a channel id assigned and which one?

Many thanks!