added undefined check while reading preferences from extension storage area