Add null check when build uri

When BaseUrl is null, during the ctor of UriBuilder will throw ArgumentNullException.