key/val copy is checked in hashtable_add

key/val copy is checked in hashtable_add: in case of NULL the return is
0