def check_charge_balance(metabolites):
    """ Check charge balance of the reaction """
    # Check that charge is set for all metabolites
    if not all(x.charge is not None for x in metabolites.keys()):
        return None
    else:
        return sum([metabolite.charge * coefficient for metabolite, coefficient in iteritems(metabolites)])