[wallace] refactoring the whenpresent method to be in the SharedDriver class