'Returns the upper bound of the ``Idx``.
Examples
>>> from sympy import Idx
>>> Idx(\'j\', 2).upper
1
>>> Idx(\'j\', 5).upper
4
>>> Idx(\'j\').upper is None
True'

@property
def upper(self):

    try:
        return self.args[1][1]
    except IndexError:
        return
