def get_field_type(cls: GenericType, field_name: str) -> GenericType | None:
    """Get the type of a field in a class.

    Args:
        cls: The class to check.
        field_name: The name of the field to check.

    Returns:
        The type of the field, if it exists, else None.
    """
    if (
        hasattr(cls, "__fields__")
        and field_name in cls.__fields__
        and hasattr(cls.__fields__[field_name], "annotation")
        and not isinstance(cls.__fields__[field_name].annotation, (str, ForwardRef))
    ):
        return cls.__fields__[field_name].annotation
    type_hints = get_type_hints(cls)
    return type_hints.get(field_name, None)
Get the type of a field in a class.

    Args:
        cls: The class to check.
        field_name: The name of the field to check.

    Returns:
        The type of the field, if it exists, else None.
    
reflex/utils/types.py