@wcypierre1989 I am using "Design-by-Contract" almost everywhere in my code to make expectations and assumptions explicit. See ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE--3YfmHfZp-U.html (i am not using microsoft "code contracts")
@cuongphung-5089 you can find the source code here: github.com/plainionist/AboutCleanCode/tree/main/AllKeywordGroup - The idea of this design is basically to avoid forcing the clients to deal with "null" by providing a special object (could be a special implementation of an interface or a derived class as in this example) which encapsulates the intended behavior (null object pattern). In this example the intended behavior was "matches all" so i also changed the design of the initial KeywordGroup class to be able to implement this behavior