inSchema function

Helper for working with compound schemas