Fix for indirect emacs buffers and null check