(note: I'm not asking what it does but why it is here)

> Since we are dealing with string values when working with REST, all these symptoms point to invalid value which should not be stored in cache.

that's partly inexact, some object members can be false or an empty string or 0 (and for null I'm unsure) and that's a perfectly normal behavior. But OK, in the discovery service context, that makes sense (small remark though, in the Root resource, the Content media-type is an empty string and that's a normal behavior, but I guess this one is not used)