Delegate all `nil` and bad input checks to a validation framework and use it in all your constructor functions.
I’ll go you one better: integrate it into your language and have the compiler enforce it for you!
I’ll go you one better: integrate it into your language and have the compiler enforce it for you!