check if the workspace exists before trying to connect to it