Fixed "Variable is not defined" error when variable was equal to
undefined.