Simplify not-null-or-undefined check