Check if the values array exists before trying to parse it.
APIWrapperFactory allows now to select a desired format even if you are building the wrapper from a City instance.
Now it is possible the get a service definition from a service instance.