〜てよかったです

Te-form+よかったです means "I'm glad such and such is/was the case." If you want to mention something in the negative in the part before よかった、you can use the negative te-form なくて.

Ex: 日本語をべんきょうしてよかったです。 (I am glad that I've studied Japanese.)

Ex: きのうパーティーにいかなくてよかったです。 (I'm glad that I didn't go to the party yesterday.)