Remove unnecessary type-checking in template registration