Just thought of something that might work. Create a snapshot of your file in history. Make a selection of the reference layer, then select the layer you want to check. Apply a gaussian blur or some other function. If an error is thrown saying that no pixels were selected, then you know that the layers don't overlap. Use the snapshot to remove the blur.
Edit: Of course if there is even the slightest filled pixel in the selection from anti aliasing, it will show that the layer's overlap.