Discard invalid types when cleaning urls