util: Add list_is_singular() helper function