If you have an empty option set in the filter.xml <optionset></optionset> you will get a null reference exception. Ether this situation should be ignored, or a error giving details on the rootcause should be given.