Replace old logic with new has_vertex instance method. Create base method for has_edge for same effect.