Check if buffer exists before set-window-buffer