java.lang.NullPointerException ERROR
<p>I'm getting this null error on this line but I'm doing an <code>if</code> check and setting an empty string if null.  Am I doing this wrong?  </p>

<pre><code>java.lang.NullPointerException
at mil.usmc.logcom.msst.handler.whatif.entry.AddEntryHandler.show(AddEntryHandler.java:99)
</code></pre>



<pre><code>public int show(Action action) throws Exception
{
    HttpServletRequest request = action.getRequest();

    String[] params = validateRequestParameters(action, PARAMETER_VALIDATION_SHOW);
    //Import from the Like-Item search page
    if (!isEmpty(params[0]))
    {

    String jobPlanId = params[0];

    AbstractJobPlanBean jobPlanBean = DAOFactory.getJobPlanDAO().getJobPlanById(Long.parseLong(jobPlanId));

    EntryForm form = new EntryForm();

    form.setMwslin(jobPlanBean.getHeader().getMwslin());  // MWSLIN
    form.setDlh(Double.toString(jobPlanBean.getUnitTotalDirectLaborHours()));   //DLH
    form.setUnitRepairCost(Double.toString(jobPlanBean.getUnitTotalMaterialCost()));    //UNIT  REPAIR COST
    form.setUnitMaterialCost(Double.toString(jobPlanBean.getUnitTotalMaterialCost()));  //UNIT MATERIAL COST
    form.setWorkTypeId(Long.toString(jobPlanBean.getHeader().getWorkType().getId()));   //WORKTYPE
   ERROR HERE --&gt;&gt;   form.setSac((jobPlanBean.getHeader().getNsn().getStoresAccountCode() == null) ? "" : jobPlanBean.getHeader().getNsn().getStoresAccountCode().toString());  //SAC
</code></pre>
