判断Request.QueryString的值解决办法

判断Request.QueryString的值
每次判断都要写
if(Request.QueryString["id"] != null && Request.QueryString["id"].ToString() !="")
感觉好烦,能不能这样
string.IsNullOrEmpty(Request.QueryString["id"])或者
string.IsNullOrWhiteSpace(Request.QueryString["id"])
但这个IsNullOrEmpty接收的是string对象,Request.QueryString["id"]返回的是object对象。
或者有没有更简便的判断方法?

------解决方案--------------------
写到一个方法里面,每次调用该方法来取值
------解决方案--------------------
Request.QueryString是NameValueCollection类型。
Request.QueryString["id"]返回的是string
可以使用IsNullOrEmpty的
------解决方案--------------------
自己写一个支持object的也行
------解决方案--------------------
BasePage里面写方法,或者写扩展方法
public static bool IsQueryStringNullOrEmpty(string id)
{
    return string.IsNullOrEmpty(HttpContext.Current.Request.QueryString[id]);
}

类似这样就行了,异常也让原生的代码的抛出
------解决方案--------------------
discuz!NT里有一个工具类

Common.DNTRequest.GetString("id");
Common.DNTRequest.GetInt("id", 0);