def _is_text(file_path) -> bool:
    """Check if a file can be read as text or not."""
    try:
        with open(file_path, "r") as f:
            f.read()
        return True
    except UnicodeDecodeError:
        return False