handle null cursors