[Tex/LaTex] Empty List Environment

#enumeratedescriptionitemizelistsmacros

I created commands for resume fields. This is a simplified example of the desired outcome:
enter image description here

Currently, I have to create two separate commands to do this, one with \begin{itemize} and the other without, otherwise I get the error:

! LaTeX Error: Something's wrong--perhaps a missing \item.

This is because the \begin{itemize} environment is empty in the second section.

Question: Is there a package or a way of using \begin{itemize} that allows the environment to be empty? For example:

\begin{itemize}
    % This environment is empty.
\end{itemize}

MWE:

\documentclass[pdftex, 10pt, letterpaper, oneside]{memoir}

\usepackage{color}
\usepackage[table]{xcolor}
\usepackage{enumitem}

\newcommand{\narrowColumn}[0]{0.25\textwidth}
\newcommand{\wideColumn}[0]{0.75\textwidth}
\newcommand{\tabularEndSpacing}[0]{0.375 cm}

% I would like something like this for everything.
\newcommand{\withItemize}[5]{
    \begin{tabular}{r | l}
        \begin{minipage}[c]{\narrowColumn}
            #1
        \end{minipage}
        &
        \begin{minipage}[c]{\wideColumn}
            {\bfseries\scshape#2}, {\itshape#3}\\
            #4
            \begin{itemize}[nosep]
                #5
            \end{itemize}
        \end{minipage}
    \end{tabular}\\[\tabularEndSpacing]
}

% However, I am forced to create a second command that does not use itemize.
\newcommand{\withoutItemize}[5]{
    \begin{tabular}{r | l}
        \begin{minipage}[c]{\narrowColumn}
            #1
        \end{minipage}
        &
        \begin{minipage}[c]{\wideColumn}
            {\bfseries\scshape#2}, {\itshape#3}\\
            #4
            #5
        \end{minipage}
    \end{tabular}\\[\tabularEndSpacing]
}

\begin{document}
\thispagestyle{empty}

% This works fine.
\withItemize{Jun 2013---Present}{Company Name}{Company Location}{Position at Company}{
    \item Comment 1
    \item Comment 2
    \item Comment 3
}

% This does not work.
%\withItemize{Jun 2013---Present}{School Name}{School Location}{Degree}{}

% Using the second command: This works fine.
\withoutItemize{Jun 2013---Present}{School Name}{School Location}{Degree}{}


\end{document}

Best Answer

Test whether #5 is empty. If it is do nothing, otherwise print an itemize environment.

\newcommand{\myentry}[5]{%
  \begin{tabular}{r | l}
  \begin{minipage}[c]{\narrowColumn}
  #1
  \end{minipage}
  &
  \begin{minipage}[c]{\wideColumn}
  \textbf{#2}, \textit{#3}\\
  #4
  \if\relax\detokenize{#5}\relax\else
    \begin{itemize}[nosep]
    #5
    \end{itemize}
  \fi
  \end{minipage}
  \end{tabular}\\[\tabularEndSpacing]%
}

I've removed \scshape because fonts normally don't have a boldface small caps variant. Use one attribute for emphasis: either bold face or small caps.

Related Question