Is there a nicer way of doing the following:
I need a check for null to happen on file.Headers before proceeding with the loop
if (file.Headers != null
Frankly, I advise: just suck up the null test. A null test is just a brfalse or brfalse.s; everything else is going to involve much more work (tests, assignments, extra method calls, unnecessary GetEnumerator(), MoveNext(), Dispose() on the iterator, etc).
An if test is simple, obvious, and efficient.