How to fix "Assert.IsAssignableFrom() Failure: Value is null" in Xunit testing? - C#