fixing check cache for undefined dates