Implement proper check for Directory