I think all these units inherit from UnitBase, so maybe you can save space and just check against the common parent class?