Use defined() instead of typeof for checking undefined.
Merge pull request #2141 from AnalyticalGraphicsInc/useDefined

Use defined() instead of typeof for checking undefined.