Make sure url is valid