add peg type checker