netdev: Assert that the type of a new network device is correct.