EDOC-1516: check cache for possible null