Use StructKeyExists instead of IsDefined