Ensure that value() returns result only after all promises are handled