Added new type error check