Qualcosa da sperimentare
`\starttext
\def\TEST{Foo}
\def\EMPTYTEST{}
\type{\def\TEST{Foo}}\par
\type{\def\EMPTYTEST{}}\par
\type{\TEST==Foo ?:}\doifvalue{TEST}{Foo}{yes} \par
\type{\TEST==foo ?:}\doifvalue{TEST}{foo}{ok} \par
\type{\MyTEST==foo ?:}\doifvalue{MyTEST}{foo}{ok} \par
\type{not \TEST==foo ?:}\doifnotvalue{TEST}{foo}{ok} \par
\type{not \MyTEST==foo ?:}\doifnotvalue{MyTEST}{foo}{yes} \par
\type{\TEST==Foo ?:}\doifelsevalue{TEST}{Foo}{yes}{no} \par
\type{\TEST==foo ?:}\doifelsevalue{TEST}{foo}{yes}{no} \par
\type{\TEST has value ?:}\doifsomething{\TEST}{yes} \par
\type{\MyTEST has value ?:}\doifsomething{\MyTEST}{yes} \par %% oops macro non definita !!!
\type{\EMPTYTEST has value ?:}\doifsomething{\EMPTYTEST}{yes} \par
\type{\TEST is empty ?:}\doifnothing{\TEST}{yes} \par
\type{\MyTEST is empty ?:}\doifnothing{\MyTEST}{yes} \par %% oops macro non definita !!!
\type{\EMPTYTEST is empty ?:}\doifnothing{\EMPTYTEST}{yes} \par
\type{\TEST is empty ?:}\doifelsenothing{\TEST}{yes}{no} \par
\type{\MyTEST is empty ?:}\doifelsenothing{\MyTEST}{yes}{no} \par %% oops macro non definita !!!
\type{\EMPTYTEST is empty ?:}\doifelsenothing{\EMPTYTEST}{yes}{no} \par
\type{\TEST is empty ?:}\doifvaluenothing{TEST}{yes} \par
\type{\MyTEST is empty ?:}\doifvaluenothing{MyTEST}{yes} \par %% oops macro non definita !!!
\type{\EMPTYTEST is empty ?:}\doifvaluenothing{EMPTYTEST}{yes} \par
\type{\TEST is empty ?:}\doifvaluesomething{TEST}{yes} \par
\type{\MyTEST is empty ?:}\doifvaluesomething{MyTEST}{yes} \par %% oops macro non definita !!!
\type{\EMPTYTEST is empty ?:}\doifvaluesomething{EMPTYTEST}{yes} \par
\stoptext`
luigi