Text this: Statistical Test for Attention in Transformers for Images and Time Series