Is it a bad practice to check null before returning from a getter?
<p>I wanna prevent getters from returning null values, like the examples bellow. Is this a bad practice?</p>

<p>Example 1</p>

<pre><code>public Integer getMinutes() {
   if (minutes == null)
       minutes = 0;
   return minutes;
}
</code></pre>

<p>Example 2</p>

<pre><code>public List getTasks() {
   if (tasks == null)
       tasks = new ArrayList();
   return tasks;
}
</code></pre>