Added warnings and errors to Doc and Docx types