If you notice mold or any other organic growth, or there are bugs, eggs, or any other contaminants in the bag, you should discard the sugar. If your granulated sugar gets hard and lumpy, it means moisture found its way inside the bag ([USU]).