code: public static Map<String, Object> getYamlObjectValue(Map<String, Object> yamlObject,
              String key, boolean allowsEmpty) throws YamlConvertException {
          Object obj = getObjectValue(yamlObject, key, allowsEmpty);
          @SuppressWarnings("unchecked")
          Map<String, Object> result = (Map<String, Object>) obj;
          return result;
      }
docs: returns null for empty