Support numbers as well as strings for IDs. Add tests.