nullableDate($row['created_at'] ?? null), updatedAt: $this->nullableDate($row['updated_at'] ?? null), ); } private function nullableDate(?string $value): ?string { if (! $value || (int) substr($value, 0, 4) < 1970) { return null; } return $value; } }