helper for schema check