add check hashmap helpers, update comments, fix empty template hashmap bug