[net] make sure netif throws an exception when called on non netif object