title: android function in class throws java.lang.NullPointerException
body: <p>I've made a class which holds some string and integers, in that class I made a function to convert the data in the class in to a readable string;</p>
  
  <pre><code>    public String GetConditions() {
          String BigString = null;
          String eol = System.getProperty("line.separator");  
          try {
              BigString += "Depth: " + ci(Depth) + eol;
  
  and so on...
  </code></pre>
  
  <p>Because I have to convert many integers, I made an extra function to convert a integer to a string;</p>
  
  <pre><code>public String ci(Integer i) { 
      // convert integer to string
      if (i != null) {
          String a = new Integer(i).toString();
      return  a;
      } else {
      return "n/a";
      }
  }
  </code></pre>
  
  <p>This throws a <code>NullPointerException</code> exception on <code>return a</code>. I'm quite new to Java, this is probally a noob question... Sorry about, thanks in advance!</p>