raise ValueError instead of AssertionError on invalid Entity names