enforce doc type on multipart docs and add tests for doc type