primary document type checking