So the beginning of my controller action is
[HttpGet] public ActionResult FillOut ( Guid pid, int? sid ) { // pid: partner id // sid (optional): survey id // if survey id not supplied in query string, find which survey the user should be on if ( sid == null ) { sid = this._Db.CheckIfFinished(pid, 1) ? 2 : 1; } ViewBag.pid = pid; ViewBag.sid = sid; ViewBag.finished = this._Db.CheckIfFinished(pid,sid); ViewBag.survtitle = this._Db.GetSurveyTitle(sid); var AllAnswers = this._Db.GetAnswersByPartner(pid,sid); and VS isn't happy because my methods this._Db.CheckIfFinished(pid,sid);, this._Db.GetSurveyTitle(sid); and this._Db.GetAnswersByPartner(pid,sid) expect the sid parameter to be an int and not an int?. But with how I'm using it, sid is guaranteed to be non-null. So is this a Visual Studio bug or is my C# technically invalid, and if it's invalid, what's the cleanest way of overcoming this issue in my particular scenario?