Desaturate it. Drop a black and white filter on the pin for two seconds and look. If the headline and the background collapse into similar greys it fails, and you see it instantly - much faster than a checker, and it catches exactly the case you're describing, where the colours are different but the brightness isn't.
The structural fix so you stop hitting it at all: don't set type directly on an unpredictable photo. Either put a solid or near-solid band behind the text, or flatten a dark overlay at around 30-40% across the whole photo and always set the headline in white on top of it. Then the photo underneath can be anything and the headline still reads.
Squinting works too and costs nothing, but desaturating is more reliable because squinting mostly tests size rather than contrast.