how know if a component is a part or an assembly

hi!
i have an assembly and i want to edit all the components but beforedoing it i have to know if the component is a part o an assembly toput swModel.EditPart or EditAssembly.
can anybody help me?
thanks!SolidworksApi macros