[bug] using `lax.cond` with partial effect function gives TypeError
In the master branch, the following script shows the error
```sh
TypeError: could not merge true_fun and false_fun output pvals: ((ShapedArray(int32[]), None), JaxTuple(*,0)) and ((ShapedArray(int32[]),ShapedArray(int32[])), JaxTuple(*,*)).
```
```
lax.cond(True, (0, 0), lambda x: (x[0], 0), (1, 1), lambda x: x)

```

While these versions works well:
```
lax.cond(True, (0, 0), lambda x: (0, 0), (1, 1), lambda x: x)
```
or
```
lax.cond(True, (0, 0), lambda x: (x[0], x[1]), (1, 1), lambda x: x)
```
diff --git a/jax/interpreters/partial_eval.py b/jax/interpreters/partial_eval.py
index 91bdc883a..f49966a6d 100644
--- a/jax/interpreters/partial_eval.py
+++ b/jax/interpreters/partial_eval.py
@@ -296,7 +296,7 @@ def join_pvals(pval1, pval2):
     pvals1, pvals2 = zip(pv1, const1), zip(pv2, const2)
     join_pvs, join_consts = unzip2(map(join_pvals, pvals1, pvals2))
     if all(isinstance(pv, AbstractValue) for pv in join_pvs):
-      return PartialVal(AbstractTuple(join_pvs), tuple(join_consts))
+      return PartialVal((AbstractTuple(join_pvs), tuple(join_consts)))
     else:
       return PartialVal((JaxprTracerTuple(join_pvs), tuple(join_consts)))
 
diff --git a/tests/lax_test.py b/tests/lax_test.py
index 7c095c6c8..45039f759 100644
--- a/tests/lax_test.py
+++ b/tests/lax_test.py
@@ -1421,6 +1421,12 @@ class LaxTest(jtu.JaxTestCase):
     self.assertEqual(fun(4), cfun(4))
     self.assertEqual(cfun(4), (4, 2., 4.))
 
+  def testIssue514(self):
+    # just check this doesn't crash
+    lax.cond(True,
+            (0, 0), lambda x: (x[0], 0),
+            (1, 1), lambda x: x)
+
   def testScanAdd(self):
     def f(x, y):
       return x + y
['jax/interpreters/partial_eval.py', 'tests/lax_test.py']