fix issue when checking subAttributes and value is falsy