[rest] fix npe