Fix assertion bug when key isn't pointer

Assertion `assert(key != NULL);` raises compile error when key isn't pointer.