to use (dired-nondirectory-p)