A nonconforming building may be altered or improved, provided that the alteration or improvement does not amount to a substantial increase of a nonconforming use, but if such alterations or improvements involve any increase in lands so used or in the cubic content of the building so used, the permit for the alteration or improvement shall be issued only upon variance granted in accordance with law; provided, however, that accessory uses and additions may be constructed on nonconforming lots in conjunction with an existing residential use if the proposed accessory use or addition complies with the setback and yard requirements set forth in § 335-93.