Fixed a bug in checking the type of edges in EdgeTypeIterator

- While checking for type of edges, equality is not sufficient as we
  are comparing two objects
- Added specs for this change