The ViewData indexer returns null if the key doesn't exist. So you can just do:

string returnUrl = (string)ViewData[Constants.ReturnsUrlViewDataKey] ?? Request.RawUrl;