modified error message of isinstanceof, istype and classref
added dirtype