Handle `null`s returned by `getCopyOfContextMap`.