I want to get all Tasks from this Java code. I get 
com.podio.APIApplicationException: null
How I skip the code with NPE and continue the execution of the code?
import com.podio.APIFactory;
import com.podio.ResourceFactory;
import com.podio.api.Podio;
import com.podio.oauth.OAuthClientCredentials;
import com.podio.oauth.OAuthUsernameCredentials;
import com.podio.task.TaskAPI;
public class PodioImpl implements Podio
{
    @Override
    public void connect(String client_id, String secret, String user_name, String password)
    {
        ResourceFactory resourceFactory = new ResourceFactory(
            new OAuthClientCredentials(client_id, secret),
            new OAuthUsernameCredentials(user_name, password));
        APIFactory apiFactory = new APIFactory(resourceFactory);
        TaskAPI api1 = apiFactory.getAPI(TaskAPI.class);
        if(api1.getActiveTasks() != null){
            System.out.println("ActiveTasks ");
        }
        if(api1.getAssignedActiveTasks() != null){
            System.out.println("AssignedActiveTasks ");
        }
        if(api1.getCompletedTasks() != null){
            System.out.println("CompletedTasks ");
        }
    }
}
 
     
     
    