using correct undefined check for global module variable