def valid_role(role):
    """
    returns the valid role from a role mention
    :param role: role to validate
    :return: role of id, None otherwise
    """
    if role is None:
        return None
    if role[0:3] == "<@&" and role[len(role)-1] == ">":
        id = role[3:len(role)-1]
        if id.isdigit():
            return id
        else:
            return None
    return None