A snippet would be helpful, but it sounds like you are trying something like this: var attributeCurrent = getAttrByName(character_id,'AttributeName');
Your problem here is that getAttrByName returns the default value for that attribute if it isn't found. The default value for any attribute's current/max value is "". So your attribute var will never be null or undefined. How are you checking for empty string? Personally, I don't know that I've ever used getAttrByName. It has such restrictive requirements for what you have to know to use it, I've always found it easier to just use findObjs and filter, which becomes even more appealing with the recent speed improvements to findObjs thanks to the caching of objects at startup.