Previously it was possible to call getValStr() on a VOBJ and VARR, which silently resulted in the return of an empty string. However, such a call would be most likely a bug. We are now throwing in case of such types.
Similarly, calling empty() and size() didn't make sense for none VOBJ/VARR UniValues.
Please note: This is a draft and not meant to be merged just yet. I created the pull request already because I wanted to see what the CI-Pipeline tells me about this. I also want to give this change another code read pass to convince myself that these changes are actually okay in every case they are currently used.