zero-copy: protect against null-pointer passing