Check key length