def maybe_na(val):
    """Return 'n/a' if non-None value represented as str is not empty

    Primarily for the consistent use of lower case 'n/a' so 'N/A' and 'NA'
    are also treated as 'n/a'
    """
    if val is not None:
        val = str(val)
        val = val.strip()
    return 'n/a' if (not val or val in ('N/A', 'NA')) else val