Added check for undefined name and value in updateModel.