Fixed type checks in tests