Make sure user-supplied url is valid.