Throw exception rather then doing an assert as this is input data and we have a test expecting an exception

Change-Id: I22591a5f7a89882f6acc8eaedf78f63a55931553