Fixed typo

Also type comparison is redundant.