Well... a true and reliable way would be to do a list on that dir/. (I think) if it came back with stuff, it's a dir... otherwise you could cd in and back out if it succeeds... either way isn't terribly efficient, but will let you know beyond a shadow of a doubt. :)