[GEOS-6628] NullPointerException when setting empty ParameterFilter (Backport on 2.5.x)

Backport on 2.5.x branch of the fix for https://jira.codehaus.org/browse/GEOS-6628