fix_dh_paramgen_type: Avoid crash with invalid paramgen type