fix for crash when url is nil

Here is fix for crash, when url is nil