Throw exception if invalid input data format