Added sublcass check