The easiest way I found is
// Checks whether a website exists by looking up its url in the current site collection
bool WebExistsByUrl(string url)
{
return SPContext.Current.Site.AllWebs.Any(w => w.Url.Equals(url, System.StringComparison.InvariantCultureIgnoreCase));
}
or even better you can put them in an extension