May be it would be clearer if we use:
if (nextFactory instanceof MuleBaseVariableResolverFactory || nextFactory.isResolveable(name))
{
return nextFactory.getVariableResolver(name);
}
return null;