check undefined and null