Added some checks to see if field values exist from the category before trying to prefill.