added check for empty list.

Why do we need this casting? Can't this whole function be:

```C#
        public bool IsNullOrEmpty<TSource>(IEnumerable<TSource> source)
        {
            return source == null || !source.Any();
        }
```