correct value check in template for category registry
use imports and code formatting