fix(config): explicit attributes type check before merge in template replacement