ArgumentNullException when argument is not null - C#