Add getOptionalConnection.