protected function getCastFromDefinition($type)
    {
        // Custom definitions.
        if (array_has(static::$cast_from, $type)) {
            return array_get(static::$cast_from, $type);
        }

        // Fallback to default.
        if (array_has(static::$default_cast_from, $type)) {
            return array_get(static::$default_cast_from, $type);
        }

        return false;
    }