Remove usage of CHECK_NOTNULL

We want to switch to absl logging instead of glog.  gtest and ceres are
going there, and we already have absl as a dependency.  ABSL doesn't
have CHECK_NOTNULL, and we can move things over in an easier to review
fashion.

Change-Id: Ifd9a11ec34a2357cec43f88dba015db9c28ed2cf
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/flatbuffers/base.cc b/aos/flatbuffers/base.cc
index afd48a2..f0e7a8b 100644
--- a/aos/flatbuffers/base.cc
+++ b/aos/flatbuffers/base.cc
@@ -51,10 +51,9 @@
   if (parent_ != nullptr) {
     return parent_->InsertBytes(insertion_point, aligned_bytes, set_zero);
   } else {
-    std::optional<std::span<uint8_t>> new_buffer =
-        CHECK_NOTNULL(allocator_)
-            ->InsertBytes(insertion_point, aligned_bytes, Alignment(),
-                          set_zero);
+    CHECK(allocator_ != nullptr);
+    std::optional<std::span<uint8_t>> new_buffer = allocator_->InsertBytes(
+        insertion_point, aligned_bytes, Alignment(), set_zero);
     if (!new_buffer.has_value()) {
       return std::nullopt;
     }
@@ -94,6 +93,7 @@
     if (absolute_offset >= modification_point &&
         object.inline_entry < modification_point) {
       if (*object.inline_entry != 0) {
+        CHECK(object.object != nullptr);
         CHECK_EQ(static_cast<const void *>(
                      static_cast<const uint8_t *>(absolute_offset)),
                  DereferenceOffset(object.inline_entry));