task could be returned null from db. Shouldn't we protect against this situation somewhere?