Add nil check for #status_code

Added a fix for `#status_code` when `self.operation` is not set.

Resolves #66