tests FEATURE more advanced tests of hash_table.c functions
diff --git a/src/hash_table.c b/src/hash_table.c
index 18ff2c3..a60c3da 100644
--- a/src/hash_table.c
+++ b/src/hash_table.c
@@ -139,7 +139,7 @@
     struct dict_rec rec, *match = NULL;
     char *val_p;
 
-    LY_CHECK_ARG_RET(ctx, ctx,);
+    LY_CHECK_ARG_RET(ctx, ctx, value,);
 
     if (!value) {
         return;
@@ -226,11 +226,9 @@
 {
     const char *result;
 
-    LY_CHECK_ARG_RET(ctx, ctx, NULL);
+    LY_CHECK_ARG_RET(ctx, ctx, value, NULL);
 
-    if (!value) {
-        return NULL;
-    } else if (!len) {
+    if (!len) {
         len = strlen(value);
     }
 
@@ -246,11 +244,7 @@
 {
     const char *result;
 
-    LY_CHECK_ARG_RET(ctx, ctx, NULL);
-
-    if (!value) {
-        return NULL;
-    }
+    LY_CHECK_ARG_RET(ctx, ctx, value, NULL);
 
     pthread_mutex_lock(&ctx->dict.lock);
     result = dict_insert(ctx, value, strlen(value), 1);
@@ -660,7 +654,7 @@
     return ret;
 }
 
-int
+LY_ERR
 lyht_insert(struct hash_table *ht, void *val_p, uint32_t hash, void **match_p)
 {
     return lyht_insert_with_resize_cb(ht, val_p, hash, NULL, match_p);