expand types_filter directive with 'if' clause