Fix potential null pointer exceptions if chatManager isn't around.