Consider following MWE and the output thereafter. I have defined an empty macro and used \ifx to identify it as such. However, when an empty macro is received from \pgfkeysgetvalue, \ifx doesn't work.
\documentclass{article}
\usepackage{pgfplots, filecontents}
\pgfplotsset{compat=1.6}
\begin{filecontents}{test.dat}
Time Distance
0 0
1 1
\end{filecontents}
\pgfplotstableset{
columns/Distance/.style={
column name={$D_{\alpha}$},
}
}
\begin{document}
%
\def\tmp{}
\ifx\tmp\empty
\noindent Tmp is \tmp.\\
\fi
%
\pgfplotstableread{test.dat}{\loadedtable}%
\pgfplotstableforeachcolumn\loadedtable\as\col{%
\pgfplotstableset{columns/\col/.try}%
\pgfkeysgetvalue{/pgfplots/table/column name}\temp%
\ifx\temp\empty%
\noindent Temp is empty.\\%
\else%
\noindent Macro col is \col. Macro temp is \temp.\\%
\fi%
}%
\end{document}

I am not sure whether macro \temp returned by \pgfkeysgetvalue is \empty. But it doesn't print anything. I have looked at these related posts:
How to check if a macro value is empty or will not create text with plain TeX conditionals?
Why doesn't \ifx work inside a node command in TikZ?
What is the difference between \pgfutil@empty and \empty in an \ifx environment