MediaBay function to combine duplicate attribute field entries

High, sometimes I get duplicates which is annoying for example in Room Type attribute, I will end up with two

-Control Room - Dry
-Control Room - Dry

This is annoying because when I go to use attribute filters there are multiples of these.