avoid NPE in URL.set when file is null