better handling of null uris