I want to post a comment to this question’s accepted answer, “Haven’t views abandoned code behind now? So what are you going to test?” pointing out that it seems to me as soon as you add an
<% if (Model.Thing == "abc") {} %>
or
@if (Model.Thing == "abc") {}
to your view, there exists the potential for something to blow up, and that potential should be guarded against.
In regard to the question I linked to, I could see an argument being made that one should guard against the possibility of null reference exceptions in the code-behind rather than littering one’s view with null checks, but then how about the case of partial views? Would it really be better to add multiple null checks in the numerous places where a partial view might be rendered, rather than one place, in the view itself?
IMO, you should only guard against null, index oob, etc, in your views if you are expecting values to be null, oob, etc.
Ideally you should have unit tests for your action methods that ensure certain model values are not null / in bounds / etc. When there is a possibility that a value will be null, then you might have a good reason for a null check in a view. Otherwise, it’s useless code.