Fix 0/'0' not being patched properly.

Use strict equality when comparing scalar values. We don't want to use strict equality on object types as DateTime instances will *always* be different, as will arrays holding associated entities.

Refs #4307