code: protected function getMutatedType($value, $dir = 'setter')
      {
          foreach ($this->{"{$dir}Mutators"} as $mutated => $mutator) {
              if ($this->getValueType($value) == $mutated || $value instanceof $mutated) {
                  return $mutated;
              }
          }
      }
docs: Get the mutated type.
  
  @param  mixed  $value
  @param  string $dir
  @return string