I had a piece of code that used this expression - someCollection.AsEnumerable(). Later on I realized that, in some cases the someCollection was set to null. However, I never got any exception from this code. I even ran it through the debugger. If I remember correctly, the expression someCollection.AsEnumerable() evaluated to null if someCollection was set to null.
Shouldn't calling someCollection.AsEnumerable() throw an exception if someCollection was set to null? Am I missing something?