refactor(Util): Simplify code in RunWaitUtils.