Corrected exception message and made empty type array a constant
Removing attribute name validation code, it doesn't affect execution
Moved default field value resolution code to a separate method