NullPointerException in Delegation Code

Hello,
this is my BPM process:


in the start event ( Inserimento richiesta ) the user insert enters values in the embedded forms.

In the service task " Setta_variabili " I’m using a Java Class

I set variables and i want to get variable ( ufficio) value in the first task and I want to set a variable depending the value of the first variable

import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;

public class CheckApprovatoreDelegate implements JavaDelegate {

@Override
public void execute(DelegateExecution execution) throws Exception {
	// TODO Auto-generated method stub
	execution.setVariable("secondo", false);
	execution.setVariable("approvato", false);
	execution.setVariable("modifica", false);
	execution.setVariable("approvato2", false);
	execution.setVariable("revocato", false);
	execution.setVariable("causale_ok", false);
	 
    String office= (String)execution.getVariable("ufficio");
	if (office.equals("dipendenti")) 
	{
		execution.setVariable("approvatore1", "responsabile1");
		}
	else if(office.equals("DAC"))
	{
	
		execution.setVariable("approvatore1", "paolorossi");

}
	else 
	{
	
		execution.setVariable("approvatore1", "giuseppeverdi");

}
	
}

}

Is it correct ??.
It seems that variable ( ufficio) is NULL
During the bulding process, I have an error **
GRAVE: ENGINE-16004 Exception while closing command context: null
java.lang.NullPointerException
** at org.camunda.bpm.quickstart.CheckApprovatoreDelegate.execute(CheckApprovatoreDelegate.java:18)

I have solved my issue changing the java delegate code in the if

	if ( office != null) 
	    {
		if (office.equals("DIPENDENTI"))
		execution.setVariable("approvatore1", "responsabile1");
		
		else if (office.equals("DAC"))
			execution.setVariable("approvatore1", "paolorossi");
		else 
		execution.setVariable("approvatore1", "giuseppeverdi");
		
       }