Ensure `$result` is always a response object