def valid_BIC(bic):
    """Check validity of BIC"""
    bic = bic.strip()
    if len(bic) != 8 and len(bic) != 11:
        return False
    if not bic[:6].isalpha():
        return False
    if not bic[6:8].isalnum():
        return False
    return True
