All mortgages on real estate in this State, and all covenants and stipulations therein contained, shall be assignable at law by writing, whether sealed or not, and any such assignment shall pass and convey the estate of the assignor in the mortgaged premises, and the assignee may sue thereon in his own name, but, in any such action by the assignee, there shall be allowed all just set-offs and other defenses against the assignor that would have been allowed in any action brought by the assignor and existing before notice of such assignment.
N.J.S. § 46:9-9