Magnetic moments in the presence of topological defects in graphene