error handling in slugify

Check if the slugified string is of length 0, then throw an error.