fixing a minor bug with custom filters that may return undefined.