Simplify error handling in checkdoc form