Added equals method to Type class