code: @Nullable
    public static String getCanonicalPathOrNull (@Nullable final File aFile)
    {
      if (aFile != null)
        try
        {
          // Note: getCanonicalPath may be a bottleneck on Unix based file
          // systems!
          return aFile.getCanonicalPath ();
        }
        catch (final IOException ex)
        {
          // fall through
        }
      return null;
    }
docs: Get the canonical path of the passed file, if the file is not
  <code>null</code>. In case of an {@link IOException}, <code>null</code> is
  returned.
  
  @param aFile
  The file to get the canonical path from. May be <code>null</code>.
  @return <code>null</code> if the passed file is <code>null</code>.