def maybe_literal(value):
    """Get a Literal type for the value or None.
    """
    try:
        return literal(value)
    except LiteralTypingError:
        return
Get a Literal type for the value or None.
    
numba/core/types/misc.py