Under some circumstances (e.g. when rendering) the geometry nodes logger is not used. This was missing a simple null check.