Fixed null pointer exception caused by duration is not found in JSON