test for null instead of undefined