An agreement in restraint of trade or a business in which goodwill gets sold is a valid contract and an exception to section 27 of the act.