public final boolean isClaimType(String claimName, Class<?> type) {
        Object value = rawClaim(claimName);
        Objects.requireNonNull(type);
        if (value == null)
            return false;
        if (type == String.class && value instanceof String)
            return true;
        if (type == Number.class && value instanceof Number)
            return true;
        return type == List.class && value instanceof List;
    }
Indicate if the claim exists and is the given type

@param claimName
           the mandatory JWT claim name
@param type
           the mandatory type, which should either be String.class,
           Number.class, or List.class
@return true if the claim exists and is the given type, otherwise false
clients/src/main/java/org/apache/kafka/common/security/oauthbearer/internals/unsecured/OAuthBearerUnsecuredJws.java