Do not pickle as hyper-parameter values also combinations of simple types

A set of simple types (str, int, float, bool) is currently not pickled in value_from_json when storing hyper-parameters as JSON. But we probably do not need to pickle also Union combinations of these either.