Refactoring. Adding verification for WithoutRoot into isWithoutRoot method.