Changed Parser::isValid signature