Catch exception when file is null during upload process