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
Merge pull request #852 from prathamesh-sonpatki/vertext_specs

Fixed a bug in checking the type of edges in EdgeTypeIterator