# Hiding section titles when the section is empty

I have created a macro like this:

\newcommand{\showsection}[2]{
\ifstrequal{#2}{}{}{\section{#1} #2}
}

It should be used like this in the document:

\showsection{Books}{
Do you know any good books?
}

If #2 is empty, as in this case below, the section title to not be shown:

\showsection{Books}{

}

Unfortunately, with some macros inside, which should sometimes appear blank, somehow something is getting through. Perhaps it is an extra space? No text is visible. I have put % after every line of the macros which I placed inside. How can I get the section titles to disappear in this case?

-
Please have a look at the documentation of etoolbox. There are also described the commands \ifblank and \ifstrempty. Another mehtod is using the pacakge xparse. –  Marco Daniel Dec 19 '11 at 12:52
Please mention important packages in the text, not just as tags. It is always good to post a add a minimal working example (MWE) that illustrates your problem exactly and lets people test their solutions easily. –  Martin Scharrer Dec 19 '11 at 12:55