determine operation type by isinstance on the key