sdb_const_anext avoid doing unnecessary steps if no next ptr is given