added error checking for term submission form.