checkSolution function

Checks whether the solution generated by the ODE solver contains negative values