guard against nil upload