if (!$dateTo instanceof DateTime) {
            throw new Exception("dateTo is not an instance of \DateTime"); 
        }