CB-2534: fixed the NullPointerException when the base url is null. Just checking if the base url is null before checking if it exists in url.

...checking if the base url is null before checking if it exists in url.