# get method Null safety

1. @override

dynamic get(

1. String? id,
2. {dynamic onError(
   1. Exception
   )?}

)
override

## Implementation

    @override
    Future<DividerModel?> get(String? id, {Function(Exception)? onError}) async {
      try {
        var collection = dividerCollection.doc(id);
        var doc = await collection.get();
        return await _populateDocPlus(doc);
      } on Exception catch (e) {
        if (onError != null) {
          onError(e);
        } else {
          print("Error whilst retrieving Divider with id $id");
          print("Exceptoin: $e");
        }
      }
      return null;
    }