Fix files argument type check