Changed dates/enddates check for 0000-00-00 to NULL