How to just check if a channel is live?

I also need that information for my project and since there was no definitive boolean value that told me this I build that value from the Amount of viewers a channel has:

NULL viewers -> Channel offline
Not NULL viewers (or a number) -> Channel online

@liamdawe hope that helps you