A general criterion based on the implicit function theorem to model aggregation and adsorption in colloidal dispersions