Target checking rolled into a single function.