added check for type error