Check if host or port is undefined before requesting for server information