Tender of performance is an offer or attempt to do what is required under a contract or under the law.