added in onReceive for checking if the actors received a terminate
message upon which it will terminate itself.