added if statement so there must be one photo upload field on the page