I've written a package that introduces a new environment:
The package however can be used for articles, books, ... Since not all of these environments have the concept of
chapter, on gets a
No counter 'chapter' defined. exception.
How can I check if the chapter counter is defined?