Added RegExp support to typechecker.