Check data before cache.