update isEntitySchema to actually check schema, plus work for both input and output of EntitySchema constructor
use isEntitySchema in EntitySchema constructor