Preconditions checking refactoring.