This doesn't ignore space, I think it's easier to use strcmp, I added one extra test for {a}
at the end:
\documentclass{article}\makeatletter\def\zz#1\zz{#1}\def\MyIfGroup#1{%\ifnum\expandafter\pdfstrcmp\expandafter{\zz#1\zz}{#1}=0\expandafter\@secondoftwo\else\expandafter\@firstoftwo\fi}\makeatother\begin{document}\MyIfGroup{{}}{true}{false}\MyIfGroup{ {}}{true}{false}\MyIfGroup{{} }{true}{false}\MyIfGroup{ {} }{true}{false}\MyIfGroup{ }{true}{false}\MyIfGroup{a}{true}{false}\MyIfGroup{{}a}{true}{false}\MyIfGroup{{a}}{true}{false}\end{document}