undef qualifies as SCALAR, need to check defined as well