title: Scala - Scalaz unMkIdentity nullPointerException
body: <p>I defined the following class</p>
  
  <pre><code>private sealed trait Action2[-T1, +R] extends Function1[T1, R] {
     def printResults()
  }
  
  private abstract class BaseAction[T1, R] extends Action2[T1, R]{
    protected var result: R = null
  
    override final def apply(values: T1) : R = {
      result = evaluate(values)
      result
    }
  
    override final def printResults() {
      if(result == null)
        print("The results have not been evaluated!")
      else
        printLazyResults(result)
    }
  
    protected[this] def printLazyResults(results: R)
    protected[this] def evaluate(values: T1) : R
  }
  </code></pre>
  
  <p>I have an implementation of this class and whenever I try to instantiate the given implementation the method:</p>
  
  <pre><code> implicit def unMkIdentity[A](x: Identity[A]): A = x.value
  </code></pre>
  
  <p>throws null pointer exception. I don't understand firstly why that is called (I import scalaz and Scalaz) and why it is getting a null value from the property result...</p>