Ensuring we check for null GatewayConfig, fixes #1818