def try_ex(func):
try:<EOL><INDENT>return func()<EOL><DEDENT>except KeyError:<EOL><INDENT>return None<EOL><DEDENT>
Call passed in function in try block. If KeyError is encountered return None.
This function is intended to be used to safely access dictionary.

Note that this function would have negative impact on performance.