How do I found out if a datagrid is bound to any data table or not?

I want to use the datagrid.datasource property to achieve this, but I am not sure how to do it.

When the datagrid.datasource is undefined, I want to do something. So what should the if statement be like?

if ( datagrid.DataSource == ??)

Please let me know if anyone knwos this.

Thanks
QQ