fix the check for when no photo is uploaded