CompilerExtension: added validate method

Because it is really handy and so far we had to copy it into every extension.

Tests will follow..