Check key IDs for validity