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