```python
def check_integer(text):
    """
    Checks if a string represents a valid integer.
    """
    try:
        int(text)
        return True
    except ValueError:
        return False

```