Check if start and end dates exist before manipulating them