Add convenience methods for detecting missing targets. At a few bail out points so that we don't try anything that will need code generator if we get an improper target.