WrapAndCast - cast a raw object to an interface