Make more strict comparison to avoid type issues when gw name only contain numbers. Fixes #2956