how to test filename is file or directory

hi all
plz let me how to test output of "tail -1 filelist.lst" is file or directory.
regards
-Bali Reddy

file=$(tail -f filelist.lst)
[ -d $file ] && echo "$file is a directory"
[ -f $file ] && echo "$file is a file"

See man test for more constructs.