Fix for https://issues.cask.co/browse/CDAP-655. Test for non-null URL before using.