Check class of str