Is there a function for validating a web URL?

Hi, I run a makewebrequest with a URL that the user has configured through a setting. Before I make the web request I'd like to parse the URL to make sure its valid. I was wondering if someone has done a function for that already so that I don't have to do all the messy string operations myself. :-) thanks-