Fix so that lack of a form and/or category name doesn't cause problems

Change-Id: Iefb4f196ecb67e502b21651367d5010a8a0f4376