Better error message for RegExprs that cannot be compiled, added doCheck method for RegExprs.