They might have been thinking of this castle:
Toompea Castle (Estonian: Toompea loss, Latin: Castrum Danorum) is a castle on Toompea hill in the central part of Tallinn, the capital of Estonia. The castle, an ancient stronghold site in use since at least the 9th century, today houses the Parliament of Estonia.
Yes! That could be the case.
But actually there are two more castles/palaces in Tallinn: