Fix broken dlg_val assigment when value is NULL.