Use finalize hooks where possible.
Use null instead of empty string.
Test return value from p_dict_set().