\newcommand{\ifsomething}[2]{%
{\setbox0=\hbox{#1}%
\ifdim\wd0=0pt%
\else%
{#2}\fi}}
