private function getFieldType($field): ?string
    {
        if ($field === null) {
            return null;
        }

        $fieldType = gettype($field);
        if ($fieldType === 'object') {
            $classNameArray = explode('\\', get_class($field));
            if (count($classNameArray) === 0) {
                return null;
            }

            $fieldType = mb_strtolower($classNameArray[count($classNameArray) - 1]);
        }

        return $fieldType;
    }