No action or counterclaim shall be maintained by any contractor in any court in this state with respect to any agreement, work, labor or materials for which a license is required by this Act or to recover the agreed price or any compensation under any such agreement, or for any such work, labor or materials for which a license is required by this Act without alleging and proving that such contractor had a valid license at the time of making such agreement and of supplying such labor, work or materials.
225 ILCS 345/25