In any action, whether a trust is involved or not, any person or persons not in being are or may become entitled to, or may upon coming into being claim to be entitled to, any future interest, legal or equitable, whether arising by way of remainder, reversion, possibility of reverter, executory devise, upon the happening of a condition subsequent, or otherwise, in any property, real or personal, involved in such action, the court may, whenever it may deem it necessary for the proper and complete determination of such cause, appoint some competent and disinterested person as guardian ad litem of such person or persons not in being; and any judgment or order entered in such action shall be as binding and effectual for all purposes as though such person or persons were in being and were parties to such action. By such appointment, the person so appointed guardian ad litem, shall not be rendered liable to pay costs of the action; and shall be allowed a reasonable fee for the services as such guardian, to be fixed by the court.
735 ILCS 5/2-501