added condition to check count date if its an instanceof Date() class refs item:293