protected function isCarbon($value) { if ($value instanceof Carbon) { return true; } throw new InvalidArgumentException('The value Passed has to be an instance of Carbon\\Carbon'); }