code: public function getMediaTypeMatch($data)
      {
          foreach ($this->getMediaTypes() as $mediaTypeClass) {
              $instance = forward_static_call(array($mediaTypeClass, 'check'), $data);
  
              if ($instance) {
                  return $instance;
              }
          }
      }
docs: return a new instance of best-matching MediaType.
  
  @param string|array $data raw media data
  
  @return MediaTypeInterface|null