code: private static MimeType getContentMimeType(Resource resource) {
          MimeType result = null;
          if (resource != null && (resource = resource.getChild(ResourceUtil.CONTENT_NODE)) != null) {
              ResourceHandle handle = ResourceHandle.use(resource);
              result = getMimeType(handle.getProperty(ResourceUtil.PROP_MIME_TYPE, ""));
          }
          return result;
      }
docs: a helper if the resource has a content node an should use this content as a fallback