validate if attribute is defined before check IsAny
Merge pull request #1055 from josedonizetti/fix_datacontractserializer_tests

validate if attribute is defined before check IsAny