This is where the is_dir()  belongs