Remove Schema::is* methods

These methods are not really used anywhere, and if they are, they can be
replaced with a call to Schema::nodeType. No reason to keep them. I had
to implement StaticSchema::nodeType(std::string) because of
presenceContainerPath_class, but that's ok.

Change-Id: Ia27f6aa1f1cd098f087767365cb6a706c255c206
diff --git a/src/ast_handlers.hpp b/src/ast_handlers.hpp
index b9d7a9d..b522957 100644
--- a/src/ast_handlers.hpp
+++ b/src/ast_handlers.hpp
@@ -157,19 +157,8 @@
             return;
         }
 
-        try {
-            boost::optional<std::string> module;
-            if (ast.m_nodes.back().m_prefix)
-                module = ast.m_nodes.back().m_prefix.value().m_name;
-            container_ cont = std::get<container_>(ast.m_nodes.back().m_suffix);
-            auto location = pathWithoutLastNode(parserContext.currentSchemaPath());
-
-            if (!schema.isPresenceContainer(location, {module, cont.m_name})) {
-                parserContext.m_errorMsg = "This container is not a presence container.";
-                _pass(context) = false;
-            }
-        } catch (std::bad_variant_access&) {
-            parserContext.m_errorMsg = "This is not a container.";
+        if (schema.nodeType(pathToSchemaString(parserContext.currentSchemaPath(), Prefixes::Always)) != yang::NodeTypes::PresenceContainer) {
+            parserContext.m_errorMsg = "This container is not a presence container.";
             _pass(context) = false;
         }
     }