The JLS, Section 15.25 talks about the type of the conditional operator expression for various combinations of the types of the second and third operands. There are lots of tables mapping the two types in all relevant combinations to the result type.
3rd → long
2nd ↓
...
Long long
...
null lub(null,Long)
Your first example has a Long and a long, which yields long. This requires lNull to be unboxed, which explains the NullPointerException.
Your second example has a null literal (not a null variable) and a long. This results in "lub(null,Long)" or Long, and no unboxing is performed, so no NPE is observed.
You can avoid the NPE by using your first example or by casting 10L as a Long, because a null and a Long yield a Long.
3rd → Long
2nd ↓
...
Long Long