How to let compiler know that List is not null? - C#