optional validation of scrooge/thrift Document

We need to throw exception somewhere to fail the build. The method already has side effects (writes to disk), so I think we can throw an exception as well.