Fix comparison of nullable value types

Fixes bug 678791