ConditionalPython
In [11]: v = 'NULL' In [12]: isinstance(v, int) and v or 0 Out[12]: 0 In [13]: v = 22 In [14]: isinstance(v, int) and v or 0 Out[14]: 22
In [11]: v = 'NULL' In [12]: isinstance(v, int) and v or 0 Out[12]: 0 In [13]: v = 22 In [14]: isinstance(v, int) and v or 0 Out[14]: 22