A trick question wouldn't have even made any sense. As it is, the question made Yamato wary because he thought his disguise started to be more or less compromised and if it had been the real Sasori, he would have thought Kabuto is up to something. Both cases not good for Kabuto's plan to make a surprise strike, because it's easier to hit a relaxed (relatively speaking, I doubt these guys are ever that relaxed) target than one that is suspicious.

So, it had to be a legit question by my logic.