[NimManager] make sure compatible type exists before remove. Credit OpenPLi.