NullPointer when Schema is null in restriction
Revert "NullPointer when Schema is null in restriction"

This reverts commit 9374163f099357329c935bb60941b4fcabf1c6fc.