Return an action if exists.

def process_action(ctx, param, value):
    """Return an action if exists."""
    actions = current_app.extensions['invenio-access'].actions
    if value not in actions:
        raise click.BadParameter('Action "%s" is not registered.', value)
    return actions[value]