Fixes error when response is nil