libs/sys: fix checking for empty table