@SuppressWarnings("unchecked")
  char getCharValue(Object obj, int k) {
    if ((obj instanceof ArgHolder<?>)
        && ((ArgHolder<?>) obj).getType().equals(Character.class)) {
      return ((ArgHolder<Character>) obj).getValue();
    } else if (obj instanceof char[]) {
      return ((char[]) obj)[k];
    } else {
      verify(false, "object doesn't contain char values");
      return 0;
    }
  }