replaced throw-if-not with !!=, better signifying output must match the passed form