Resolves #4 by making sure that the response object is initialized before accessing its properties.