function parse(version, loose) {
  if (version instanceof SemVer)
    return version;

  if (typeof version !== 'string')