Added check to avoid empty regexp filters