This chapter shall not prevent adjoining proprietors from entering into special agreements about walls on the lines between them, but no evidence thereof shall be competent unless in writing, signed by the parties thereto or their lawfully authorized agents, or the guardian of either, if a minor, who shall have full authority to act for the guardian’s ward in all matters relating to walls in common without an order of court therefor.