Add scalar assertion

This adds the ability to assert that a value is a scalar.