EmperorFool
Deity
In the Civilopedia pCity will be NULL. In that case you can use GC.getGameINLINE().getActivePlayer() to acquire the active player's ID and use it to get the civilization type.
Code:
if city is null or city doesn't have building type
if city is null
display message using active player to get building type
else
display message using city to get building type