diff --git a/jbpm-human-task/jbpm-human-task-core/src/main/java/org/jbpm/services/task/commands/GetTaskContentCommand.java b/jbpm-human-task/jbpm-human-task-core/src/main/java/org/jbpm/services/task/commands/GetTaskContentCommand.java
index <HASH>..<HASH> 100644
--- a/jbpm-human-task/jbpm-human-task-core/src/main/java/org/jbpm/services/task/commands/GetTaskContentCommand.java
+++ b/jbpm-human-task/jbpm-human-task-core/src/main/java/org/jbpm/services/task/commands/GetTaskContentCommand.java
@@ -30,7 +30,10 @@ public class GetTaskContentCommand extends TaskCommand<Map<String, Object>> {
 	@SuppressWarnings("unchecked")
 	public Map<String, Object> execute(Context cntxt) {
         TaskContext context = (TaskContext) cntxt;
-        Task taskById =context.getTaskQueryService().getTaskInstanceById(taskId);
+        Task taskById = context.getTaskQueryService().getTaskInstanceById(taskId);
+        if (taskById == null) {
+        	throw new IllegalStateException("Unable to find task with id " + taskId);
+        }
         
         TaskContentService contentService = context.getTaskContentService();
BZ-<I> - NPE in GetTaskContentCommand.java:<I> when trying to get task content for second human task in own web app