avoid segfault from NULL keys_vals (when there are no tags)