The wrapper is unnecessary and misleading. You already check `network` before calling it but if you want to add this test here, then after calling you should check for the returning type to be distinct than `undefined`. My recommendation is to remove the wrapper.