fixup! Introduce the checkstyle plugin and fix the code accordingly (issue #150).

Fixing a bug introduced when refactoring the validation function.