code: public static function getExtensionFor(string $mimetype): ?string
      {
          $extensions = static::getExtensions();
          if (false !== $match = array_search($mimetype, $extensions, true)) {
              return $match;
          }
  
          return null;
      }
docs: fetch file-extension for given mimetype
  @param  string $mimetype
  @return string|null