Fixed Invalid Cast error in Assert.AreNotEqual