Added logic to detect strings