I think this should also check the url isn't empty.

/cc @carlosmn