correct isWrapper and unwrap implementations