Improved ValueError on closed connection string.