Fix crash when passing NULL to RBufRead