// Returns true if this is a host that closes *before* it ends?!?!
module.exports.isAnEarlyCloseHost= function( hostName ) {
  return hostName.match(".*google(apis)?.com$")
}
// Returns true if this is a host that closes *before* it ends?!?!
module.exports.isAnEarlyCloseHost= function( hostName ) {
  return hostName && hostName.match(".*google(apis)?.com$")
}
Update to make sure hostName exists before trying to act on it. Otherwise it will throw an error.
Update to make sure hostName exists before trying to act on it. Otherwise it will throw an error.