Units/filter multiple

@masatake I don't like how the code ended up. Do you have any ideas to simplify that check?