public static object GetRequiredValue(this RouteData routeData, string key)
{
if (routeData.Values.Any(x => x.Key == key))
{
return routeData.Values.Where(x => x.Key == key).First().Value;
}
throw new InvalidOperationException("The RouteData must contain an item named '" + key + "' with a non-null value");
}