def _is_null(instance, name):
if name in instance.__dict__:<EOL><INDENT>value = instance.__dict__[name]<EOL><DEDENT>else:<EOL><INDENT>value = getattr(instance, name)<EOL><DEDENT>if value:<EOL><INDENT>return False<EOL><DEDENT>elif value is None:<EOL><INDENT>return True<EOL><DEDENT>name = name.upper()<EOL>metaclass = get_metaclass(instance)<EOL>for attr_name, attr_ty in metaclass.attributes:<EOL><INDENT>if attr_name.upper() != name:<EOL><INDENT>continue<EOL><DEDENT>attr_ty = attr_ty.upper()<EOL>if attr_ty == '<STR_LIT>':<EOL><INDENT>return value == <NUM_LIT:0><EOL><DEDENT>elif attr_ty == '<STR_LIT>':<EOL><INDENT>return len(value) == <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>
Determine if an attribute of an *instance* with a specific *name* 
is null.