771. Mortgagee's costs reasonably and properly incurred.

The mortgagee is entitled to add to his security the costs, reasonably and properly incurred, of proceedings between himself and a third party where what is impugned is the title to the estate1. In such a case the mortgagee acts for the benefit of the equity of redemption as much as for that of the security2. However, where a third party impugns the title to the mortgage, or the enforcement or exercise of some right or power accruing to the mortgagee thereunder, the mortgagee's costs of the proceedings, even though they be reasonably and properly incurred, are not allowable