Added defensive code for null form fields.