cli: export function for illegal tag checking