This is a follow-up question to Xparse Adding backslash after each command.
xparse allows for conditional tokens to be inserted into the parameter text for a macro using the t<token> directive (from the documentation:
tAn optional<token>, which will result in a value\BooleanTrueif<token>is present and\BooleanFalseotherwise. Given ast<token>.
However, why do the following two implementations - one using (La)TeX and the other using LaTeX3 - not produce the same result?

\documentclass{article}
\usepackage{amsmath,xparse}
\begin{document}
% LaTeX implementation
\makeatletter
\newcommand{\mycommand}[1]{%
\begin{alignat}{1} #1\null \end{alignat}%
}%
\newcommand{\command}[1]{\text{#1} \@ifnextchar\null{}{\\}}%
\makeatother
Some text before.
\mycommand{
\command{Hello}
\command{Hello two}
\command{Hello three}
}%
Some text after.
\noindent
\hrulefill
% LaTeX3 implementation
\RenewDocumentCommand{\mycommand}{ m }{%
\begin{alignat}{1} #1\null \end{alignat}%
}%
\RenewDocumentCommand{\command}{ m t\null }{\text{#1} \IfBooleanF{#2}{\\}}%
Some text before.
\mycommand{
\command{Hello}
\command{Hello two}
\command{Hello three}
}%
Some text after.
\end{document}
The conditional token seems to be picked up appropriately when adding \tracingmacros1 to the LaTeX3 section. However, I'm not sure why \null is "never found", leading to \BooleanFalse (and therefore a \\) even in the last statement.
\@ifnextchardoesn't know whether it is in math mode or not, (nor does xparse) they are looking for tokens. the fact that a space token doesn't produce a typeset result in vertical or math modes isn't relevant at this level. – David Carlisle Jan 23 '15 at 20:14