simplfied exclude-element-by-type.