Improve error message for bad representation