Made erdos_renyi more robust

Added two assertions that the parameters passed are correct
Added tests for the ER model