code: @Nullable
    public static String checkFileName (@Nullable final String sFilename)
    {
      if (sFilename != null && sFilename.indexOf ('\u0000') != -1)
      {
        throw new InvalidFileNameException (sFilename,
                                            "Invalid filename: " + StringHelper.replaceAll (sFilename, "\u0000", "\\0"));
      }
      return sFilename;
    }
docs: Checks, whether the given file name is valid in the sense, that it doesn't
  contain any NUL characters. If the file name is valid, it will be returned
  without any modifications. Otherwise, an {@link InvalidFileNameException}
  is raised.
  
  @param sFilename
  The file name to check
  @return Unmodified file name, if valid.
  @throws InvalidFileNameException
  The file name was found to be invalid.