Hello,
That is strange. I built a VI which queries the DAQmx Task Types like you describe, and it works correctly for me. If all channels in a task are analog input (by the way, this is a little redundant as all channels in a task must be of the same type), then the task name is passed to an array. Otherwise, an empty constant is passed.
Try running the attached VI and see if it works correctly for you.
Regards,
Sean C.