I have an error.aspx page. If a user comes to that page then it will fetch the error path in page_load() method URL using Request.QueryStrin
error.aspx
page_load()
Request.QueryStrin
To check for an empty QueryString you should use Request.QueryString.HasKeys property.
Request.QueryString.HasKeys
To check if the key is present: Request.QueryString.AllKeys.Contains()
Request.QueryString.AllKeys.Contains()
Then you can get ist's Value and do any other check you want, such as isNullOrEmpty, etc.