Implement error checking for selected ID.