Refactoring check for absolute/relativ document root check