Make add helper function to detect custom ID type