Fix null znode stat object

stat object (passed by reference) is not set if the znode queried contains a NULL. This just moves the `RETURN_NULL` call below the point where the reference is updated. Fixes #29