defined() does not catch undef