try allowing dval to be null