Value() might return NULL here (at least there's no check earlier to make sure it isn't. Maybe use ValueStr() instead if an empty string would be acceptable?