checkGraphtype function

Check graph input type (for whether it's a graph or a edgelist).