def is_number(x):
    """
    Checks, whether a string is numeric or not.

    >>> is_number("ha")
    False
    >>> is_number("123")
    True
    >>> is_number("12.987")
    True
    """

    try:
        int(x)
        return True
    except:
        return False