Add assertions to shared buffers to debug future null pointer exceptions