Edited an exception message to cover both possible cases.