def _has_gene_reaction_rule(reaction):
    """Check if the reaction has a gene reaction rule."""
    rule = getattr(reaction, 'gene_reaction_rule', None)
    return rule is not None and rule.strip() != ''