Add `allowedOnType` feature Fix #4