Ensure that :gateway is not nil or empty before establishing gateway connection
Merge pull request #390 from mattheath/empty-gateway

Don't attempt to connect to nil/empty :gateway