code: async def check_config(self) -> None:
          
          if self.directory is None:
              return
  
          try:
              stat_result = await aio_stat(self.directory)
          except FileNotFoundError:
              raise RuntimeError(
                  f"StaticFiles directory '{self.directory}' does not exist."
              )
          if not (stat.S_ISDIR(stat_result.st_mode) or stat.S_ISLNK(stat_result.st_mode)):
              raise RuntimeError(
                  f"StaticFiles path '{self.directory}' is not a directory."
              )
docs: Perform a one-off configuration check that StaticFiles is actually
          pointed at a directory, so that we can raise loud errors rather than
          just returning 404 responses.