[Refactoring] Add Module::isRoot()
Merge pull request #2574 from 9rnsr/refactor_root

[Refactoring] Add Module::isRoot()