Assign values for unassigned instance variables before referencing them....

When developing a new site for which i want to use elastichsearch, I installed the plugin. But when i drag the facetted search widgets on a siderbar it threw up errors. So this patch should fix that issue by assigning default values before trying to get their values.