How to Identify Android TV

There was a need to find out that this is an Android TV and not launch certain functions. I didn’t find anything in the documentation, is there such a possibility?

The problem is that I use admob to display ads. But as I understand it, admob is not supported for Android TV. Therefore, I would like to disable advertising exclusively for Android TV