creating connection only if the connection string exists