Fixing the if statement as it lead to 'TypeError: Parameter 'url' must be a string, not undefined' in certain cases
Merge pull request #383 from thefosk/master

Fixing a bug that generates an unexpected TypeError