Validate the beacon configuration

def validate(config):
    '''
    Validate the beacon configuration
    '''
    _config = {}
    list(map(_config.update, config))

    if not isinstance(config, list):
        return False, ('Configuration for avahi_announce '
                       'beacon must be a list.')

    elif not all(x in _config for x in ('servicetype',
                                        'port',
                                        'txt')):
        return False, ('Configuration for avahi_announce beacon '
                       'must contain servicetype, port and txt items.')
    return True, 'Valid beacon configuration.'