All sales of real estate, made under powers contained in mortgages or deeds of trust contrary to the provisions of this article, shall be null and void, notwithstanding any agreement or stipulation to the contrary.