Check for url before url.match

If we do not check if url is set, we may get an "Uncaught TypeError: Cannot call method 'match' of undefined".
Merge pull request #10 from RiZKiT/patch-1

Check for url before url.match