[TIMOB-18262] Short circuit path checks on valid path
[TIMOB-18262] Refactor & safety checks
Merge pull request #6521 from vishalduggal/timob-18262-35X

[TIMOB-18262] (3_5_X) Short circuit path checks on valid path