debug_put_get: don't crash on null pointers
MFC after: 7 days
(cherry picked from commit 92e8b4a6301cc4ff4481e981c95c5b30b2a44506)