Check defaultSection for undefined as well, === null only checks for null, not undefined