Anthony Joshua should still fight on despite his devastating defeat to Daniel Dubois, says heavyweight rival Dillian Whyte.