If the jury is satisfied that the defendant, or those under whom he claims, made on the premises, at a time when there was reason to believe the title good under which he or they were holding the premises, permanent and valuable improvements, they shall estimate in his favor the value of the improvements made before notice, in writing, of the title under which the plaintiff claims, not exceeding the amount actually expended in making them and not exceeding the amount to which the value of the premises is actually increased thereby at the time of the assessment.
N.C. Gen. Stat. § 1-342