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