Something like `if ((chain = fc_chain_get_by_name (ci->values[0].value.string)) != NULL)` ?