I often come across code like the following:
if ( items != null) { foreach(T item in items) { //... } }
Basically, the
As mentioned here you need to check is it not null.
Do not use an expression that evaluates to null.