[slices] fix api functions null data check.