Template:Department:Page?
Usage
This template takes one unnamed parameter, and looks for a Wikibooks Stacks department with that name. Returns non-blank only if the department page exists and is apparently properly set up.
Internals
This template pings the department page, and checks for the correct response by {{Department:Page}}. The correct ping response cannot result if the department doesn't exist, and is wildly unlikely if the department page isn't properly set up. This template does not use the #ifexist:
magic word.