Added null check to DateMap