Programmatically check whether it's a