util.NetworkStringToID( string ) != 0

That works the same way. I'm sure your function works too though.