Future<T> sendRequestNotNull<T extends R>(List args) => sendRequest<T>(args) .then((r) => r ?? (throw StateError("Null response")));