Compare values to :undef to test for existence

Change-Id: I87a7268ae56737a507faafb510801fd5b21a04d2