Add better checking when adding discount codes