Check if solution is valid