throw error if storage is not instance of Storage