Add validation for enddate

-Add check for enddate existance and correction if it is missing
-Add check for enddate after startdate