Update schema.py

Make sure compartments are also the specified dictionary type.