def _cert_type_from_kwargs(**kwargs):
    """Return cert type string from kwargs values"""

    for k in ('admin', 'creator', 'initiator', 'platform'):
        try:
            if k in kwargs['user_type'] and kwargs['user_type'][k]:
                return k
        except LookupError:
            if k in kwargs and kwargs[k]:
                return k

    return None