Utilities for working with metaclasses