diff --git a/pom.xml b/pom.xml
index 76c4e53..1316c92 100644
--- a/pom.xml
+++ b/pom.xml
@@ -52,6 +52,14 @@
src
test
target/classes
+
+
+ test
+
+ **/*.yml
+
+
+
maven-compiler-plugin
diff --git a/src/com/esotericsoftware/yamlbeans/YamlReader.java b/src/com/esotericsoftware/yamlbeans/YamlReader.java
index f247cb6..6c510d8 100644
--- a/src/com/esotericsoftware/yamlbeans/YamlReader.java
+++ b/src/com/esotericsoftware/yamlbeans/YamlReader.java
@@ -190,7 +190,7 @@ private Class> chooseType (String tag, Class> defaultType, Class> provided
try {
Class> loadedFromTag = findTagClass(tag, classLoader);
if (loadedFromTag != null) {
- if (!providedType.isAssignableFrom(loadedFromTag)) {
+ if (providedType != null && !providedType.isAssignableFrom(loadedFromTag)) {
throw new YamlReaderException("Class specified by tag is incompatible with expected type: "
+ loadedFromTag.getName() + " (expected " + providedType.getName() + ")");
}