unarr: properly detect error case