In this MWE, a command argument is directly passed to an environment. That works fine with empty values:
\documentclass{article}
\newcommand{\minipag}[1]{%
\begin{minipage}[b][#1][b]{6em}
One minipage
\end{minipage}
}
\begin{document}
\minipag{2em}
\minipag{\relax}
\minipag{}
\end{document}
However, when the argument is passed using a macro, and it takes an empty value, it is not recognized by the (minipage) environment:
\documentclass{article}
\newcommand{\minipag}[1]{%
\def\upto{#1}
\begin{minipage}[b][\upto][b]{6em}
One minipage
\end{minipage}
}
\begin{document}
\minipag{2em}
\minipag{\relax}
\minipag{}
\end{document}
Why does it happens? What is the way to do this?
For me, the underlying question is what are string arguments really: macros, lists of tokens, general text, registers...