def find_monetary_value(instance, concept, context, currency):
    """Returns the fact value found for the given concept, context and currency."""
    # Ignore non-monetary facts
    if concept.is_monetary() and context:
        facts = instance.facts.filter(concept, context)
        for fact in facts:
            # Check for xsi:nil facts
            if fact.xsi_nil:
                continue
            # Ignore facts reported with other currency units
            unit = fact.unit_aspect_value
            if unit.iso4217_currency == currency:
                return int(fact.effective_numeric_value)
    return None