from typing import Any


def get_object_or_none(cls: Any, **kwargs) -> Any:
    """
    Returns model instance or None if not found.
    :param cls: Class or queryset
    :param kwargs: Filters for get() call
    :return: Object or None
    """
    try:
        qs = cls._default_manager.all() if hasattr(cls, "_default_manager") else cls  # pylint: disable=protected-access
        return qs.get(**kwargs)
    except Exception:
        return None