Swap patterns for type coercive checks
fix NPE when creating new lists in yaml