Compress the network checking method

No implementation changes really - just adding a quick comment and
making the code a bit shorter... while retaining pretty much the same
readability.