How to determine the FILE_OBJECT represents a fiel or a directory?

Hi.

How to determine the FILE_OBJECT represents a fiel or a directory?

I has build a IRP to query file system,but It return FALSE.
What wrong?

What the best way I would do?

Thanks in advance
Zhj