Improve error message for missing class name id (#14643)

Change-Id: I71a96985fab62b648207393916566f3e1d757ad1