LIB-48: don't return NULL on !success

This probably would lead to segfaults otherwise, which is quite
disruptive for something that can happen quite easily on usage errors.
Having empty values is probably a better indication on what is wrong.