function inferType(obj, schemaPath) {
      for (var typeName in inferredProperties) {
          var lastElementInPath = schemaPath[schemaPath.length - 1];
          if (matchesType(obj, lastElementInPath, inferredProperties[typeName])) {
              return typeName;
          }
      }
  }
Checks whether given `obj` type might be inferred. The mechanism iterates through all inferred types definitions,
tries to match allowed properties with properties of given `obj`. Returns type name, if inferred, or null.

@returns {string|null}