fixed issue with incorrect edge creation

move if to check if s was blank

also fixed issue of Vertex v not being correctly defined when a word already
existed in the graph