Guard clause
A Guard Clause (one of the SmalltalkBestPracticePatterns, and equally applicable in a whole bunch of languages) is a chunk of code at the top of a function (or block) that serves a similar purpose to a Precondition. It typically does one (or any or all) of the following: checks the passed-in parameters, and returns with ... Read more