Testing whether kubectl/oc context is valid

Does anyone have a novel way to test kubectl/oc login context explicitly in a playbook to fail instead of waiting to lower in roles?

I’m familiar with k8s_auth module for handling explicit Kubernetes/OpenShift login, however there are still cases where we need to fallback on kubectl/oc context when using k8s module and k8s lookup plugin and having a reasonable way of testing connectivity would save a lot of time…

Thanks,
Andy