protected function getMutator($value, $dir = 'setter', $type = null)
    {
        $type = $type ?: $this->getValueType($value);

        foreach ($this->{"{$dir}Mutators"} as $mutated => $mutator) {
            if ($type == $mutated || $value instanceof $mutated) {
                return $mutator;
            }
        }
    }