This is more about unreachable servers than missing shares.

Your proposal has merit though, as "net view" returns pretty quickly if the server cannot be found.
 Code:
$sServerToPing="\\foobar"
Shell '"'+%COMSPEC%+'" /C net view '+$sServerToPing+' >nul: 2>nul:'
If @ERROR
	"Net view failed - will not map shares"+@CRLF
Else
	"Net view ok - will map shares"+@CRLF
EndIf


The port probe would be quicker, but the net view solution has the benefit that it doesn't require another tool to be installed.