[PATCH] util: typedparam: Fix sentinel handling in template validator