[PATCH 6.10 224/375] libbpf: Add NULL checks to bpf_object__{prev_map,next_map}