protected function getMorphableModelsForFieldData(ModelFormFieldDataInterface $data)
    {
        $modelsOption = array_get($data->options(), 'models', []);

        // Users may have set the string value with the model class, instead of a class => array value pair
        $modelClasses = array_map(
            function ($key, $value) {
                if (is_string($value)) {
                    return $value;
                }

                return $key;
            },
            array_keys($modelsOption),
            array_values($modelsOption)
        );

        return array_unique($modelClasses);
    }