In every memorandum of mortgage there shall be implied against the mortgagor a covenant that he or she will keep all buildings or other improvements erected and made upon the land in as good and substantial repair as they were in at the date of the mortgage, and that the mortgagee may, at all convenient times, until the mortgage is discharged, be at liberty, with or without surveyors or others, to enter into, and upon, the land to view and inspect the state of repair of the buildings and improvements.