code: public static function check($data)
      {
          $allowedExtensions = array(
              'png',
              'jpeg',
              'jpg',
              'gif',
              'tiff',
              'svg',
          );
  
          if (in_array(strtolower(pathinfo($data, PATHINFO_EXTENSION)), $allowedExtensions)) {
              return new self($data);
          } else {
              return;
          }
      }
docs: @TODO: implement extra file object check
  
  @param $data
  
  @return ImageMediaType|null