def is_number(s):
    """Return :code:`True` if cast to :code:`float` does not throw ValueError, :code:`False` otherwise."""
    try:
        float(s)
        return True
    except (TypeError, ValueError):
        return False