Handles API endpoints returning zero content if no match
Handles API endpoints returning zero content if no match

Some of the KB API endpoints return zero-length content if there is no
match to the query (instead of, for example, an empty JSON array or
list). The problem is that then there is also no content-type header,
resulting in an error when testing whether the content-type is JSON.
This will catch that condition and return NULL to the caller.

xu-hong/rphenoscape