Check that filter is correct type

Check that the filter is the correct type before working with items.
Remove unneeded isset

Remove unneeded isset from the category type check.
Merge branch 'category-error'