Add tests for ValueError in loops and _SlugCheck