Fixed logic to check if id is an integer. The id is always returned as a string, using regex to check if it is an integer.