check if data from hash about dates is udnefined before doing anything