This reverts commit 0f8964bb62. Reason for revert: Still needs more places to have undefined checks. Notably this breaks the diff screen. Change-Id: Ifeecb2272144a688c96e63a942b221482d4eb69d
0f8964bb62