Cleaned up and removed some null reference exceptions in the error message decode method.