Refactoring document checks to use Upload type