Fix bug to ensure port is defined

We're deploying our apps in a Windows environment where we have named pipes as hosts and ports are undefined. 

This particular bug was causing Good to throw errors for some of our apps. This appears to resolve the issue.