Check if the argument is a gateway or an interface