public static boolean $if(Object value) {
    if (value == null) {
      return false;
    }
    if (value instanceof Boolean) {
      return ((Boolean) value).booleanValue();
    }
    if (value instanceof String) {
      return !((String) value).isEmpty();
    }
    if (value instanceof Iterable<?>) {
      return !Iterables.isEmpty((Iterable<?>) value);
    }
    if (value instanceof Number) {
      return ((Number) value).intValue() != 0;
    }
    if (value instanceof Optional<?>) {
      return ((Optional<?>) value).isPresent();
    }
    return true;
  }
Effect of using this method is boxing in calling code.
@param value value
@param <T> result type
@return the same value.
generator/src/org/immutables/generator/Intrinsics.java