BUG FIX: Changed check to undefined with === as proposed by jslint.