Add in check for class type