How to judge data can be plt.imshow

if i have a python data (can be anything )
how to judge data can be plt.imshow

According the documentation of imshow,

The input may either be actual RGB(A) data, or 2D scalar data, which will be rendered as a pseudocolor image.