title: Call mixin if variable is defined
body: <p>I try to use mixin guards with <code>when</code> condition, but during compiling I get the following error:</p>
  
  <blockquote>
    <p>.mixin is undefined</p>
  </blockquote>
  
  <pre><code>.mixin (@color) when (isstring(@color)) {
    //some code
  }
  
  .mixin(#008000);
  </code></pre>
  
  <p>When I remove the <code>when</code> condition it works. Whats the problem here?</p>
  
  <hr>
  
  <p>The problem is that we have variables inside our less-files which are defined in one compile-process. But during another compile-process this variables are not defined because we need a little bit dynamic here.</p>
  
  <p>So I have to check if the variable is defined. When I try it over</p>
  
  <pre><code>$variables = [
     'testColor' =&gt; '#fff111',
  ];
  $lessc-&gt;setVariables($variables);
  $cachedCompile = $lessc-&gt;cachedCompile($publicPath .   $inputFile);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>.mixin (@color:none) when (iscolor(@color)) {
     color: #fff;
  }
  
  .mixin(@testColor);
  </code></pre>
  
  <p>Everything works. But when I remove the <code>testColor</code> variable in the variable-array it crashes because it isn't defined.</p>