Added a sanity check to paramsFilter to not do anything when there is no array or an array without any items