Programmatically check whether