def METHOD_NAME(identifier):
    """Get owners legal type."""
    if not identifier:
        return None, None
    if business := Business.find_by_identifier(identifier):
        return business.legal_type, business
    try:
        url = f'{current_app.config["SEARCH_API"]}/businesses/search/facets?\
                start=0&rows=20&categories=status:ACTIVE&query=value:{identifier}'
        response = requests.get(url)
        response.raise_for_status()
        data = response.json()
        if results := data.get('searchResults', {}).get('results'):
            for entity in results:
                if entity.get('identifier') == identifier:
                    return entity.get('legalType'), None
        return None, None
    except (requests.exceptions.RequestException, requests.exceptions.HTTPError) as err:
        logger.error(err, exc_info=True)
        return None, None