Fixing tests, better error handling

what happens if one of these conditions is not met? Won't `Message` be undefined? Is this the expected behavior? Also, I'm not sure what is the behavior of the guard clause in JavaScript when you put chain a couple of them together. It may be worth breaking this out and being explicit about the fail condition.