Alex notes users might reasonably pass NULL pointers when trying to get
values from statistics cursors, it's a cheap test to make sure we don't
drop core.  Reference #579.