def is_number(var):
try:<EOL><INDENT>float(var)<EOL>return True<EOL><DEDENT>except ValueError:<EOL><INDENT>return False<EOL><DEDENT>except TypeError:<EOL><INDENT>return False<EOL><DEDENT>
Check if variable is a numeric value.

    Parameters
    ----------
    var : object

    Returns:
    --------
    bool
        True if var is numeric, False otherwise.