One of your queries on that line is returning no results. Split the line into separate queries so you can test them in the debugger. Something like
var a = mainPart.Document.Body.Descendants<SdtBlock>();
var b = a.Where(r => r.SdtProperties.GetFirstChild<Tag>().Val == "Name");
SdtBlock block = b.Single();
Once you've found out which bit is returning an empty result set try and work out why that is. Either the data is wrong, you are handling it wrong, or no results is a valid outcome and you need to change your code to accommodate it. We don't know your business rules so you will have to decide what the appropriate fix it.