Use InvalidDataException

Change-Id: I0201a21c1ebcdabe5b1f169acaf2031cd15e079e